Daily Archives: 27/07/2010

Get Powershell Execution Policy on remote machines

Written by Tao Yang

Today I’ve been asked how to inventory PowerShell execution policies on all servers in a domain. I originally thought I can ultilise RemoteIn as PowerShell V2 should be deployed on all servers. then I realised WSMan wasn’t configured on the srevers so I couldn’t use “New-PSSession” cmdlet…

Therefore, I wrote a function called Get-RemoteExecutionPolicy.  It retrieves the setting from the remote registry.

The usage is: Get-RemoteExecutionPolicy <machine name>.