Remotely Enable PSRemoting

Description: By default PowerShell will not allow you to remotely enable PSRemoting on other computers, you must run Enable-PSRemoting -Force on the local machine to allow PSRemoting. This article will show you how to Remotely enable PSRemoting using PSExec.

Resolution:

  1. Download PsExec from here
  2. Extract everything to a location you can reference later, in my case I made a PSTools folder at C:\
  3. Run the following command in Command Prompt in the folder you placed PsExec in “psexec.exe \\COMPUTERNAME -s powershell Enable-PSRemoting -Force”
    PSTools
  4. Done, you can test if PSRemoting is enabled by getting the function here
Note
-You may have to specify the path to psexec.exe.
– You will need admin rights on the remote machine
– The admin$ share must exist on the target system (it does by default)
– You can test this with “net view \\COMPUTERNAME /all” to see all the shares on the remote system
– You must put the name of the remote machine at “COMPUTERNAME”

Source


Leave a Comment