All posts filed under: Remoting

Test-WSManCredSSP: Check if a remote computer has WSMan CredSSP enabled

Update: This script won’t work against Windows 2003 or Windows XP systems. There is no CredSSP support on this and hence the WSMan:\<ComputerName>\Client\Auth\CredSSP or WSMan:\<computerName>\Service\Auth\CredSSP won’t resolve. You can use -ErrorAction SilentlyContinue along with Get-Item cmdlet when reading these values, if you don’t want to see an error. Thanks to @dfinke for reporting this. I’ve published a free book on PowerShell 2.0 remoting. You can download it at: When using PowerShell remoting, WSMan CredSSP is a requirement if there are multiple hops involved in the remoting scenario. When using remoting in an automation scenario, it becomes very important to know if the remote computer has CredSSP enabled or not. PowerShell v2 provides a cmdlet — Get-WSManCredSSP that tells you if CredSSP client or server  roles are enabled on the local computer. Make a note, I said “local computer”. This cmdlet, unfortunately, does not have a -ComputerName parameter. You may get a question, why not use Invoke-Command and run this cmdlet on the remote machine? Yes, we can do that. But, only if the remote computer …

Remote install of SharePoint 2010 prerequisites

I’ve published a free book on PowerShell 2.0 remoting. You can download it at: Did you ever try installing SharePoint 2010 prerequisites remotely? If so, you would know by now that it is not easy. Essentially because of the Windows update packages in the prerequisites. It is a known issue that Wusa.exe cannot be invoked in a remote session. If you try to install SharePoint 2010 prerequisites remotely — either using PowerShell remoting or WMI — it fails with an error code 5. We cannot really claim to have a fully unattended SharePoint deployment process until we have a solution to the prerequisite install process. So, with that background, I started working on the script for remotely installing SharePoint 2010 prerequisites. In today’s post, I will show you how to do that. To achieve this, I used a combination of PsExec.exe and PowerShell remoting. Here are the prerequisites for this script to work. PowerShell remoting must be enabled the remote system where you are deploying SharePoint prerequisites. On the remote system, CredSSP must be enabled …

PowerShell to list / add / remove Windows roles & features remotely

Lot of my R & D work at home happens on a couple of physical systems and lot of virtual machines hosted on Hyper-V. One thing that I regularly do is to rebuild lot of these machines and in that process, I add/remove Windows OS features many times. One default setting I have on all my systems is PowerShell remoting. This helps me access any system from a central location to add / remove these Windows features. I have been using PowerShell remoting combined with Server Manager cmdlets in Windows Server 2008 R2. But, every time I want to enable/disable a feature, there is lot of typing. So, I ended up writing my own wrapper for doing this remotely using three functions or cmdlets — whatever you call it. These functions have been tested on Windows Server 2008 R2 and ServerCore R2 OS. ServerCore is a bit tricky though. We don’t have PowerShell enabled by default. So, we have to manually enable Windows PowerShell feature using OCSetup. Only then, we can use this script for …