Powershell – How to execute a powershell script via group policy

group-policypowershellscripting

How can I execute a powershell script by means of group policy on a number of machines?

The script is signed and will run on the targeted machines when you right-click and select "run with powershell".

Best Answer

Check out this page: http://technet.microsoft.com/en-us/library/ee176949.aspx

In particular, I think you'd want to edit your machine start up GPO to run:

C:\windows\system32\windowspowerShell\v1.0\powershell.exe & "C:\script.ps1"

The path to PowerShell.exe does not change if you have v1 or v2 installed.