cmdlet for enable-psremoting on remote machine

This topic contains 3 replies, has 3 voices, and was last updated by  Srikanth Byram 2 years, 9 months ago.

  • Author
  • #29080

    Srikanth Byram

    invoke-command winrm -cn computername -scriptblock {enable-psremoting}

    above command gives error

    error : client cannot connect to the destination specified

    note :winrm service is running on the destination specified.

    am using powershell v3

  • #29081

    Don Jones

    You can't use Remoting to enable Remoting. If Remoting isn't turned on on the remote machine, Invoke-Command can't connect to it.

    You need to run Enable-PSRemoting locally, or use GPOs to enable it. See, "Secrets of PowerShell Remoting" for extremely detailed walkthrough.

  • #29083

    Bob McCoy

    I agree with Don — these should really be done via GPO. But if that is not an option, I've written a brief How-To using PSExec.

  • #29117

    Srikanth Byram

    thank you both Don and bob .

You must be logged in to reply to this topic.