Get Powershell Execution Policy on remote machines

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>.

Leave a Reply

%d bloggers like this: