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.
By day, I’m a systems admin for a medium size company in the Pacific Northwest.
By night, I’m a blogger, gamer, and all around general nerd.
If you found one of my articles useful, please consider supporting this site!
Monero: 48PxwMvbwoB2M86sHespLBKcSL9cWxrnJDmga9XshSqRP1joykRNpKkDGUz4ohhxD1bMH92poMyZWBBqkPmQ2bHpLP4EDnz
Bitcoin: bc1qc0fyze8x9lxp42x5p3zpry6f0lsr6l5pgq4jkh
Ethereum: 0xc613cBc79Ea4a84AE5538ec3321E214363305121