Advanced Windows PowerShell Scripting Video Training

Advanced Windows PowerShell Scripting Video Training
Advanced Windows PowerShell Scripting Video Training

Monday, October 15, 2012

How to run GPResult on a remote client with PowerShell

In the past, to run the GPResult command, you would need to either physically visit this client, have the user do it, or use and RDP connection.  In all cases, this will disrupt the user.  First, you need PowerShell remoting enabled on the target machine.  You can do this via Group Policy.

Open PowerShell and type this command.

Invoke-Command –ScriptBlock {GPResult /r} –ComputerName <ComputerName>

Replace <ComputerName> with the name of the target.  Remember, the target needs to be online and accessible to you.

No comments: