I have about 30 computers that I need information from. like whether its online, its hard drive space, and what processes are running. I have my script on my system that I run and I am getting confused on how it authenticates and processes some of the requests. When I use things like:

Get-WmiObject -ComputerName <foocomputer>

it seems to act differently than:

Get-Process -ComputerName <foocomputer>

I read something about how sometimes Powershell uses WMI in some instances and RPC in others. What do I need so that I can execute this script on my machine and get this information from all the other machines while keeping it secure?


  • windows 7 (possibly 8 or 10)
  • powershell 4.0 installed

Remote computers

  • windows 7 (with PS4.0) (to test with)
  • windows 8 (end targets)


  • domain

What you need is to enable PSRemoting on each remote computer. I think you'll need to touch each computer physically to do that, but afterward you should be good to go. On each remote computer, open Powershell as administrator, and enter this command:


For security, I like to follow this up with a second command:

Set-PSSessionConfiguration -Name Microsoft.PowerShell -showSecurityDescriptorUI

That will open a dialog that lets you fine-tune who has remote access. You could add specific users, or something like domain admins.

One more caveat: The remote registry service is not configured to start automatically on Windows 7. It's probably the same in Windows 8 but I'm not sure. If you plan to run your script often, you may want to have that service start automatically. For ad hoc needs, you can start it from your computer with the sc command:

sc \\computername start remoteregistry

That way, the service will only run until the next reboot.

  • I've done all commands and added my domain user to have all permissions. I still get Access is Denied from get-wmiobject and Couldn't connect to remote machine from get-process. i also could not remote sc. but i did start it manually on the machine – ProjectPaatt Sep 8 '16 at 20:12
  • @ProjectPaatt try: briantist.com/how-to/powershell-remoting-group-policy – Kage Sep 11 '16 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.