Archive

Archive for the ‘Sysadmin’ Category

Microsoft Script Explorer for Windows PowerShell (pre-release)

April 11, 2012 1 comment

Would it not be helpful if all scripts are at one place and you can navigate/browse them through single window?
Microsoft team is working on a tool called Script Explorer for Windows Powershell.

Go through below link for more details.

http://blogs.technet.com/b/exchange/archive/2012/03/14/check-out-microsoft-script-explorer-for-windows-powershell-pre-release.aspx

How to know the switch name to which your server is connected

I came across a situation today where I had to find out the switch details to which a particular server is connected. Often we come across such kind of cases where your network administrator is unavailable to tell you which switch/port it is or data center engineer not around to help you with this information.

After thinking about this problem for sometime, one thing clicked in my mind. I remember in VMWare ESX environment, I used CDP(Cisco Discovery protocol) abilities from Virtual center to find out to which switch a NIC is connected. That means all I need to do is, get this CDP information from the switch to which my server NIC/network connection is connected to. So, the question remained is, how do we send the CDP request to the switch, and how to analyze that data.

I did some googling and realized that I am not alone in this world and there are several people who are having similar requirements for different purposes. Then I started looking for CDP utilities for windows operating system and located one — CDP Monitor from TellSoft. I have seen a few people recommended using this in some forums. I didn’t try it personally but you may want to look at this tool. You can get it from http://www.tallsoft.com/cdpmonitor.htm

I didn’t try this tool directly but while going through the information about this tool, I saw somewhere it is mentioned that this uses WinPCAP and fetches the CDP information from that. Then I thought, if it is using WinPCAP why not use Wireshark to get this information? This tool is already available on my server(because it is a much have tool for any deep dives). I captured the network traffic on the server for sometime using Wireshark and looked for the filters that can show only the CDP information and I am successful. I have got the switch details I needed.

Below is the brief procedure:

  1. Download and install Wireshark from http://www.wireshark.org/download.html
  2. Launch Wireshark and start capturing the traffic on interface for which you need to find the swtich and port details.
  3. Let the capture run for few minutes and then in Filter section type CDP and click on Apply.
  4. This will show the CDP traffic flow through the server
  5. Now select the CDP traffic and expand Cisco Discovery Protocol section in packet details pane.
  6. Here the the Device ID represents the switch name to which your server connected
  7. And the Port ID represents the ethernet port on switch to which your server is connected

Hmm… I found what I need. I thought documenting this will help other as well and hence authored this port. Feel free to comment.

 

Microsoft TechEd India 2012 Live

If you are in INDIA and cannot attend TechEd 2012 for some commute or any different reasons, there is an opportunity for you to attend all TechEd sessions from your desk itself. Microsoft has made TechEd India 2010 online to busy admins and tech enthusiasts. All you need to do is visit below link and register yourself.

https://india.msteched.com/TechEdLive

You can follow all TechEd India 2012 sessions include keynotes, demos, etc.

If you find any session interesting for System administrators, then please do share the details in comments sections so that others can follow it.

Hope this helps…

Tip: How to open a program as administrator

February 19, 2012 Leave a comment

Hi Readers,

Before signing out today, I wanna share a quick tip that you can use in windows 7 or windows 2008 computers to open any program with administrator account. That means elevating a applications. You might want to ask, isn’t it easy to right click and say “Run As Administrator”?. Well, that option you won’t get for all applications. Give a try with Office applications if you want to observe this. In such cases, one need to open a elevated command prompt and launch the application from there which is somewhat time consuming. Instead you can use the below tip.

Hold Ctrl + Shift and then click on the application. It will automatically try to open in elevated mode.

Hope this helps and happy learning.

Categories: Sysadmin, Tips, Windows 7

Powershell: Script to query softwares installed on remote computer

February 18, 2012 7 comments

Recently I came across a forum question where I have seen people using Win32_Product WMI class to get the installed installed applications list from remote computers. Historically, Win32_Product proved to be a buggy one due to various factors (which I will talk in later posts). So, I didn’t recommend them to use Win32_Product WMI class. If not WMI, what are the various options available to get the installed problems from remote computers. There are two methods (1) Using Win32Reg_AddRemovePrograms (2) Using Registry(uninstallkey).

The Win32Reg_AddRemovePrograms is not a common WMI class that you will find in any windows computer. It comes along with SMS or SCCM agent installation. So if you have one of these agents then probably you can explore this method. Otherwise, we need to rely on registry to get this information. Is the information queried from registry is accurate? My answer is YES and NO. It gives all the applications installed by both MSI installer and executables. But some of the registry keys will have less information about the software — not sure why it is that way.

Keeping the downsides aside, it is definitely the best approach to get installed softwares from remote computer. I am also excluding the applications from display if their display name black(which makes sense). This script will return the uninstall string as well which is essential for uninstalling the software. I will use this in my upcoming posts to uninstall a software remotely.

Now Code follows.

[cmdletbinding()]            

[cmdletbinding()]
param(
 [parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
 [string[]]$ComputerName = $env:computername            

)            

begin {
 $UninstallRegKey="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
}            

process {
 foreach($Computer in $ComputerName) {
  Write-Verbose "Working on $Computer"
  if(Test-Connection -ComputerName $Computer -Count 1 -ea 0) {
   $HKLM   = [microsoft.win32.registrykey]::OpenRemoteBaseKey('LocalMachine',$computer)
   $UninstallRef  = $HKLM.OpenSubKey($UninstallRegKey)
   $Applications = $UninstallRef.GetSubKeyNames()            

   foreach ($App in $Applications) {
    $AppRegistryKey  = $UninstallRegKey + "\\" + $App
    $AppDetails   = $HKLM.OpenSubKey($AppRegistryKey)
    $AppGUID   = $App
    $AppDisplayName  = $($AppDetails.GetValue("DisplayName"))
    $AppVersion   = $($AppDetails.GetValue("DisplayVersion"))
    $AppPublisher  = $($AppDetails.GetValue("Publisher"))
    $AppInstalledDate = $($AppDetails.GetValue("InstallDate"))
    $AppUninstall  = $($AppDetails.GetValue("UninstallString"))
    if(!$AppDisplayName) { continue }
    $OutputObj = New-Object -TypeName PSobject
    $OutputObj | Add-Member -MemberType NoteProperty -Name ComputerName -Value $Computer.ToUpper()
    $OutputObj | Add-Member -MemberType NoteProperty -Name AppName -Value $AppDisplayName
    $OutputObj | Add-Member -MemberType NoteProperty -Name AppVersion -Value $AppVersion
    $OutputObj | Add-Member -MemberType NoteProperty -Name AppVendor -Value $AppPublisher
    $OutputObj | Add-Member -MemberType NoteProperty -Name InstalledDate -Value $AppInstalledDate
    $OutputObj | Add-Member -MemberType NoteProperty -Name UninstallKey -Value $AppUninstall
    $OutputObj | Add-Member -MemberType NoteProperty -Name AppGUID -Value $AppGUID
    $OutputObj# | Select ComputerName, DriveName
   }
  }
 }
}            

end {}

Copy this code to a text file and save it as Get-InstalledSoftware.ps1. Look at the below image for usage.

FIX: DFS Replication failed to register itself with WMI.

February 14, 2012 Leave a comment

You might get alerts your DFS-R management pack in SCOM about the DFS-R service inability to register itself with WMI and it can impact the replication. Exact error message is given below.

DFS Replication failed to register itself with WMI. Replication is disabled until WMI registration succeeds.

To resolve this issue, you may need to re-register DFS-R related DLL and other files that belongs to WMI. Before going there, just restart your DFS-R service once to confirm that your problem is not transient and happening all time. You will notice a error message with 6104 event ID in DFS Replication event log after you restart the service. If this event is present, then problem is live and you should fix it.

The following solution worked for me.

CD %windir%\system32\wbem

mofcomp dfsrprov.mof

mofcomp dfsrprov.mfl

wmiprvse /regserver

net stop dfsr

net start dfsr

All it does is re-register the WMI related files of DFS-R.

If you still notice issues, you may want to re-register everything under WBEM folder. This was suggested in Technet Forum.

CD %windir%\system32\wbem
For /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s
for /f %s in (‘dir /b *.mof *.mfl’) do mofcomp %s
wmiprvse /regserver
net stop dfsr
net start dfsr

if the problem is still not resolved, try rebooting the DFS-R server.

Sometimes, the compilation of MOF files might fail with below errors while performing above steps. In such cases, http://support.microsoft.com/kb/841619 might help you.

C:\WINNT\system32\wbem>mofcomp dfsrprov.mof
Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.3959
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: dfsrprov.mof
MOF file has been successfully parsed
Storing data in the repository…
An error occurred while opening the namespace for object 1 defined on lines 4 -
4:
Error Number: 0x8007000e, Facility: Win32
Description: Not enough storage is available to complete this operation.
Compiler returned error 0x8007000e

A few more reference that might be useful for troubleshooting the issue:

  1. DFSR Does Not Replicate Temporary Files : http://blogs.technet.com/b/askds/archive/2008/11/11/dfsr-does-not-replicate-temporary-files.aspx
  2. http://social.technet.microsoft.com/Forums/en-US/winserverfiles/thread/b8a8f0e6-9fcb-4a98-9951-bce109927dc8/

Thanks for reading my rambling. I wrote this for my quick reference and to help people who is searching for similar information.

WARNING: Above steps involves re-registration of WMI providers. So, test them in your lab and try in production at your own risk. I am not responsible for any damage that caused by above procedure.

Hope this helps…

 

Use https for safe tweeting

November 30, 2011 Leave a comment

Hello Readers,
How many of you regularly use twitter? I guess most of you. Have ever worried about the security it is providing? You should read on if your answer is NO.

One of colleagues gave a quick demo a few days back to show how insecure the default twitter is. His demo proved that, any one sitting in same network as yours can easily hijack your twitter account and tweet on behalf of you. He was able to make it because twitter runs on http by default. Since it is http, all the data transfer will happen over wire in plain text format. So, any one in your network with a couple of  tools can spoof your MAC address can easily capture what you are sending over wire and get the twitter cookie(key for maintaining your twitter session) and tweet using your twitter account. The method that my colleague demonstrated is a simple hack any one with computer knowledge can execute it.

How to I make it secure:  Twitter provides a option to make your twitter account to use https(secure http) as default protocol. Making use of this will at least prevent your twitter account from this kind of silly hacks.

You can follow the below procedure to enable the https

  • Logon to twitter account.
  • Go to your profile tab and click on edit profile
  • Go to Account section in your profile and check the box Always use HTTPS
  • Click on Save and enter your password when prompted

  • Now your twitter account is secured.
Categories: Sysadmin, Tips

PowerShell: Quick and easy to start stop a remote service

November 22, 2011 3 comments

Do you like one liners in powershell? Here is the quick and easy way to start, stop, restart a service on remote computer. This doesn’t require PowerShell remoting. That means you can use it against any computer which has windows operating system installed.

So far I have authored two articles on managing services using powershell:

  1. Start/Stop/Restart service on remote computer with powershell
  2. PowerShell: Start and stop services on remote computer with alternate credentials

The first one I wrote when I was not matured enough with PowerShell and the second one recently to address a specific requirement where user need to pass alternate credentials to manage services.

As most system administrators love to use poweshell one-liners which avoids any external script/module invocation, I want to share this little one which starts, stops, and restarts a service on remote computer.

Start a service on remote computer:

Start-Service -InputObject $(Get-Service -Computer COMPUTER1 -Name spooler)

Stop a service on remote computer:

Stop-Service -InputObject $(Get-Service -Computer COMPUTER1 -Name spooler)

Restart a service on remote computer:

Restart-Service -InputObject $(Get-Service -Computer COMPUTER1 -Name spooler)

Hope these little ones helps.

PowerShell: Convert your VB scripts to PowerShell

November 12, 2011 Leave a comment

The popularity of PowerShell is increasing day-to-day and now every System administrator want to say bye to their VB scripts and enter the powerful powershell world. A system administrator who is familiar with VB script(or has in home grown scripts in VB) want to try powershell, the first question he gets into mind is, “how to do xyz task in powershell”. Of course, we can ask our big brother google.com but it will take little long to find the powershell way of coding a task.

For those kind of admins, MS has published a long list of converting xyz from VB script to PowerShell. This pretty much enough for a person who wants to convert their VB scripts into powershell code. For your easy reference I am posting the content from MS technet site to here.

Hope this helps…

Cmdlets and Add-ons
Converting Dictionary Object to Windows PowerShell Commands
Converting VBScript Commands to Windows PowerShell Commands
Converting VBScript’s Abs Function
Converting VBScript’s Addition Operator
Converting VBScript’s And Operator
Converting VBScript’s Array Function
Converting VBScript’s Asc Function
Converting VBScript’s Assignment Operator
Converting VBScript’s Atn Function
Converting VBScript’s CBool Function
Converting VBScript’s CByte Function
Converting VBScript’s CCur Function
Converting VBScript’s CDate Function
Converting VBScript’s CDbl Function
Converting VBScript’s CInt Function
Converting VBScript’s CLng Function
Converting VBScript’s CSng Function
Converting VBScript’s CStr Function
Converting VBScript’s Call Statement
Converting VBScript’s Chr Function
Converting VBScript’s Class Statement
Converting VBScript’s Clear Method
Converting VBScript’s Concatenation Operator
Converting VBScript’s Const Statement
Converting VBScript’s Cos Function
Converting VBScript’s CreateObject Function
Converting VBScript’s Date Function
Converting VBScript’s DateAdd Function
Converting VBScript’s DateDiff Function
Converting VBScript’s DatePart Function
Converting VBScript’s DateSerial Function
Converting VBScript’s DateValue Function
Converting VBScript’s Day Function
Converting VBScript’s Dim Statement
Converting VBScript’s Division Operator
Converting VBScript’s Do…Loop Statement
Converting VBScript’s Eqv Operator
Converting VBScript’s Erase Statement
Converting VBScript’s Err Object Description Property
Converting VBScript’s Err Object HelpContext Property
Converting VBScript’s Err Object HelpFile Property
Converting VBScript’s Err Object Number Property
Converting VBScript’s Err Object Source Property
Converting VBScript’s Escape Function
Converting VBScript’s Eval Function
Converting VBScript’s Execute Statement
Converting VBScript’s ExecuteGlobal Statement
Converting VBScript’s Exit Statement
Converting VBScript’s Exp Function
Converting VBScript’s Exponentiation Operator
Converting VBScript’s Filter Function
Converting VBScript’s Fix Function
Converting VBScript’s For Each…Next Statement
Converting VBScript’s For…Next Statement
Converting VBScript’s FormatCurrency Function
Converting VBScript’s FormatDateTime Function
Converting VBScript’s FormatNumber Function
Converting VBScript’s FormatPercent Function
Converting VBScript’s Function Statement
Converting VBScript’s GetLocale Function
Converting VBScript’s GetObject Function
Converting VBScript’s GetRef Function
Converting VBScript’s Hex Function
Converting VBScript’s Hour Function
Converting VBScript’s If…Then…Else Statement
Converting VBScript’s Imp Operator
Converting VBScript’s InStr Function
Converting VBScript’s InStrRev Function
Converting VBScript’s InputBox Function
Converting VBScript’s Int Function
Converting VBScript’s Integer Division Operator
Converting VBScript’s Is Operator
Converting VBScript’s IsArray Function
Converting VBScript’s IsDate Function
Converting VBScript’s IsEmpty Function
Converting VBScript’s IsNull Function
Converting VBScript’s IsNumeric Function
Converting VBScript’s IsObject Function
Converting VBScript’s Join Function
Converting VBScript’s LBound Function
Converting VBScript’s LCase Function
Converting VBScript’s LTrim Function
Converting VBScript’s Left Function
Converting VBScript’s Len Function
Converting VBScript’s LoadPicture Function
Converting VBScript’s Log Function
Converting VBScript’s Mid Function
Converting VBScript’s Minute Function
Converting VBScript’s Mod Operator
Converting VBScript’s Month Function
Converting VBScript’s MonthName Function
Converting VBScript’s MsgBox Function
Converting VBScript’s Multiplication Operator
Converting VBScript’s Not Operator
Converting VBScript’s Now Function
Converting VBScript’s Oct Function
Converting VBScript’s On Error Statement
Converting VBScript’s Option Explicit Statement
Converting VBScript’s Or Operator
Converting VBScript’s Property Get Statement
Converting VBScript’s Property Let Statement
Converting VBScript’s Property Set Statement
Converting VBScript’s Public Statement
Converting VBScript’s RGB Function
Converting VBScript’s RTrim Function
Converting VBScript’s Raise Method
Converting VBScript’s Randomize Statement
Converting VBScript’s ReDim Statement
Converting VBScript’s Rem Statement
Converting VBScript’s Replace Function
Converting VBScript’s Right Function
Converting VBScript’s Rnd Function
Converting VBScript’s Round Function
Converting VBScript’s ScriptEngine Function
Converting VBScript’s ScriptEngineBuildVersion Function
Converting VBScript’s ScriptEngineMajorVersion Function
Converting VBScript’s ScriptEngineMinorVersion Function
Converting VBScript’s Second Function
Converting VBScript’s Select Case Statement
Converting VBScript’s Set Statement
Converting VBScript’s SetLocale Function
Converting VBScript’s Sgn Function
Converting VBScript’s Sin Function
Converting VBScript’s Space Function
Converting VBScript’s Split Function
Converting VBScript’s Sqr Function
Converting VBScript’s Stop Statement
Converting VBScript’s StrComp Function
Converting VBScript’s StrReverse Function
Converting VBScript’s String Function
Converting VBScript’s Sub Statement
Converting VBScript’s Subtraction Operator
Converting VBScript’s Tan Function
Converting VBScript’s Tan Function
Converting VBScript’s Time Function
Converting VBScript’s TimeSerial Function
Converting VBScript’s TimeValue Function
Converting VBScript’s Timer Function
Converting VBScript’s Trim Function
Converting VBScript’s TypeName Function
Converting VBScript’s UBound Function
Converting VBScript’s UCase Function
Converting VBScript’s Unescape Function
Converting VBScript’s Vartype Function
Converting VBScript’s Weekday Function
Converting VBScript’s WeekdayName Function
Converting VBScript’s While…Wend Statement
Converting VBScript’s With Statement
Converting VBScript’s Xor Operator
Converting VBScript’s Year Function
Converting Windows Script Host Methods to Windows PowerShell Commands
Converting the Dictionary Object’s Add Method
Converting the Dictionary Object’s CompareMode Property
Converting the Dictionary Object’s Exists Method
Converting the Dictionary Object’s Item Property
Converting the Dictionary Object’s Items Method
Converting the Dictionary Object’s Key Property
Converting the Dictionary Object’s Keys Method
Converting the Dictionary Object’s Remove Method
Converting the Dictionary Object’s RemoveAll Method
Converting the FileSystemObject to Windows PowerShell Commands
Converting the FileSystemObject’s Add Method
Converting the FileSystemObject’s AtEndOfLine Property
Converting the FileSystemObject’s AtEndOfStream Property
Converting the FileSystemObject’s AvailableSpace Property
Converting the FileSystemObject’s BuildPath Method
Converting the FileSystemObject’s Close Method
Converting the FileSystemObject’s Column Property
Converting the FileSystemObject’s Copy Method
Converting the FileSystemObject’s CopyFile Method
Converting the FileSystemObject’s CopyFolder Method
Converting the FileSystemObject’s CreateFolder Method
Converting the FileSystemObject’s CreateTextFile Method
Converting the FileSystemObject’s DateCreated Property
Converting the FileSystemObject’s DateLastAccessed Property
Converting the FileSystemObject’s DateLastModified Property
Converting the FileSystemObject’s Delete Method
Converting the FileSystemObject’s DeleteFile Method
Converting the FileSystemObject’s DeleteFolder Method
Converting the FileSystemObject’s Drive Property
Converting the FileSystemObject’s DriveExists Method
Converting the FileSystemObject’s DriveLetter Property
Converting the FileSystemObject’s DriveType Property
Converting the FileSystemObject’s Drives Property
Converting the FileSystemObject’s FileExists Method
Converting the FileSystemObject’s FileSystem Property
Converting the FileSystemObject’s Files Property
Converting the FileSystemObject’s FolderExists Method
Converting the FileSystemObject’s FreeSpace Property
Converting the FileSystemObject’s GetAbsolutePathName Method
Converting the FileSystemObject’s GetBaseName Method
Converting the FileSystemObject’s GetDrive Method
Converting the FileSystemObject’s GetDriveName Method
Converting the FileSystemObject’s GetExtensionName Method
Converting the FileSystemObject’s GetFile Method
Converting the FileSystemObject’s GetFileName Method
Converting the FileSystemObject’s GetFileVersion Method
Converting the FileSystemObject’s GetFolder Method
Converting the FileSystemObject’s GetParentFolderName Method
Converting the FileSystemObject’s GetSpecialFolder Method
Converting the FileSystemObject’s GetStandardStream Method
Converting the FileSystemObject’s GetTempName Method
Converting the FileSystemObject’s IsReady Property
Converting the FileSystemObject’s IsRootFolder Property
Converting the FileSystemObject’s Line Property
Converting the FileSystemObject’s Move Method
Converting the FileSystemObject’s MoveFile Method
Converting the FileSystemObject’s MoveFolder Method
Converting the FileSystemObject’s Name Property
Converting the FileSystemObject’s OpenAsTextStream Method
Converting the FileSystemObject’s OpenTextFile Method
Converting the FileSystemObject’s ParentFolder Property
Converting the FileSystemObject’s Path Property
Converting the FileSystemObject’s Read Method
Converting the FileSystemObject’s ReadAll Method
Converting the FileSystemObject’s ReadLine Method
Converting the FileSystemObject’s RootFolder Property
Converting the FileSystemObject’s SerialNumber Property
Converting the FileSystemObject’s ShareName Property
Converting the FileSystemObject’s ShortName Property
Converting the FileSystemObject’s ShortPath Property
Converting the FileSystemObject’s Size Property
Converting the FileSystemObject’s Skip Method
Converting the FileSystemObject’s SkipLine Method
Converting the FileSystemObject’s SubFolders Property
Converting the FileSystemObject’s TotalSize Property
Converting the FileSystemObject’s Type Property
Converting the FileSystemObject’s VolumeName Property
Converting the FileSystemObject’s Write Method
Converting the FileSystemObject’s WriteBlankLines Method
Converting the FileSystemObject’s WriteLine Method
Converting the Windows Script Host AddWindowsPrinterConnection Method
Converting the Windows Script Host AppActivate Method
Converting the Windows Script Host Close Method
Converting the Windows Script Host ConnectObject Method
Converting the Windows Script Host Count Method
Converting the Windows Script Host CreateObject Method
Converting the Windows Script Host DisconnectObject Method
Converting the Windows Script Host Echo Method
Converting the Windows Script Host EnumNetworkDrives Method
Converting the Windows Script Host EnumPrinterConnections Method
Converting the Windows Script Host Exec Method
Converting the Windows Script Host Execute Method
Converting the Windows Script Host Exists Method
Converting the Windows Script Host ExpandEnvironmentStrings Method
Converting the Windows Script Host GetObject Method
Converting the Windows Script Host GetResource Method
Converting the Windows Script Host LogEvent Method
Converting the Windows Script Host MapNetworkDrive Method
Converting the Windows Script Host Popup Method
Converting the Windows Script Host Quit Method
Converting the Windows Script Host Read Method
Converting the Windows Script Host ReadAll Method
Converting the Windows Script Host ReadLine Method
Converting the Windows Script Host RegDelete Method
Converting the Windows Script Host RegRead Method
Converting the Windows Script Host RegWrite Method
Converting the Windows Script Host Remove Method
Converting the Windows Script Host RemoveNetworkDrive Method
Converting the Windows Script Host RemovePrinterConnection Method
Converting the Windows Script Host Run Method
Converting the Windows Script Host Save Method
Converting the Windows Script Host SendKeys Method
Converting the Windows Script Host SetDefaultPrinter Method
Converting the Windows Script Host ShowUsage Method
Converting the Windows Script Host SignFile Method
Converting the Windows Script Host Skip Method
Converting the Windows Script Host SkipLine Method
Converting the Windows Script Host Sleep Method
Converting the Windows Script Host Terminate Method
Converting the Windows Script Host VerifyFile Method
Converting the Windows Script Host Write Method
Converting the Windows Script Host WriteBlankLines Method
Converting the Windows Script Host WriteLine Method
Introduction to Windows PowerShell Transactions
Introduction to Windows PowerShell 2.0 CTP v2
Join the Social
Remoting Quoting
Script Editors
Searching Active Directory with Windows PowerShell
Select-String Cmdlet Updates
Specops Command
The Get-Random Cmdlet
The Out-GridView Cmdlet: Displaying Information in a Data Grid
The Out-Gridview Cmdlet: Filter With Out-GridView
The Set-StrictMode Cmdlet
The Windows PowerShell Debugger
WMI Enhancements in Windows PowerShell 2.0 CTP
WMI Event Monitoring
Workflow Studio

only administrators have permission to add software during terminal services. if you want to install or configure software on server contact your admistrator

November 10, 2011 Leave a comment

You might see the error message outlined in subject while installing/uninstalling software on windows 2003 computer by connecting to terminal services. We all know that application installation has certain limitations when it comes to terminal services (anyone know why?). In such cases if you still want to install/uninstall the application on these terminal services enabled servers, you need to choose one of the following methods.

If this the requirement is just one of the case, then option#1 best suits you.

Option#1:

start mstsc with /console or /admin option and then connect to the server. This allows you to connect to the console of the server directly eliminating terminal services piece from you way.

Go to start -> Run -> type “mstsc /admin /v:servername” and click OK if you are using RDP client v6 or above

Go to start ->Run -> type “mstsc /console /v:servername” and click OK if you are using legacy version of RDP client.

Option#2:

If your administrators are expected to install applications on servers by connecting via terminal services, then you need to make sure that application installation is allowed. You can do it via group policies.

“computer configuration” -> “administrative templates” -> “windows components” -> “windows installer” -> “allow admin to install from terminal server session” should be enabled

Hope this helps.