• Status: Solved
  • Priority: Medium
  • Security: Private
  • Views: 44
  • Last Modified:

how to run gpresult on a remote machine?

What's a good script to run gpresult on a remote machine either PowerShell or command prompt? I also need the output to save to remote location.
0
victor2008
Asked:
victor2008
3 Solutions
 
Zaheer IqbalTechnical Assurance & ImplementationCommented:
0
 
footechCommented:
Why not just run the GP Results Wizard from within the GP Management console on the server?  After it's run you can save the report if you wish.
0
 
Hello ThereSystem AdministratorCommented:
We use PSExec.
Just get it, run it and run CMD as admin:
psexec \\computername -u “domain.local\administrator” -p “admin_password” cmd

This opens remote CMD and you just need to run gpresult /H c:\gpresults.txt command and save the log to the target computer or wherever you want.

Done!
1
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
This should also work detached
psexec \\computername -d -u "domain.local\administrator" -p "admin_password" gpresult /r > gpresults.txt

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now