Enabling WinRM. Quick n’ Dirty.

All this blogging about running scripts on remote PC’s, servers, etc, and it suddenly dawned on me that I take for granted that I’ve had to first setup the ability to remotely manage all of these devices. So if you want to do all those snazzy things like Enter-Pssession or Invoke-Command you’ll need to enable WinRM . So, to remedy that here are a few different ways to enable what Microsoft Windows Remote Management or WinRM for short.

If your environment is on a domain, you can create a GPO to enable WinRM, but you also need to create the associated firewall rules via GPOs with it. There are a ton of other tutorials on that out there so we wont go into this time around.

The quick and dirty way (and my preferred honestly) is by opening a command prompt as Administrator on the local machine and running:

winrm quickconfig -quiet

You should see this:

You should now be able to remote into the device.

Quick and easy.

On a side note Solarwinds has a nifty little GUIfied version of this same process if that floats your boat.

Solarwinds Remote Execution Enabler for PowerShell

It will enable WinRM on the local machine or remote if you have to proper credentials. It seems to use an embedded psexec like function to enable it remote so if you have psexec capabilities, it should do the trick nicely.

How ever you enable WinRM, enjoy your new found psremoting capabilities! Just remember, with great power comes great responsibility. Use it wisely.

Leave a Reply

Your email address will not be published. Required fields are marked *