Get Powershell Execution Policy on remote machines

less than 1 minute read

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.

Usage:

Get-RemoteExecutionPolicy \<machine name\>.

Leave a comment