cmdlet for enable-psremoting on remote machine

Welcome Forums General PowerShell Q&A cmdlet for enable-psremoting on remote machine

This topic contains 3 replies, has 3 voices, and was last updated by

 
Participant
3 years, 3 months ago.

  • Author
    Posts
  • #29080

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    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

    Participant
    Points: 0
    Rank: Member

    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.

    http://community.spiceworks.com/how_to/87066-setting-up-psremoting-remotely

  • #29117

    Participant
    Points: 0
    Rank: Member

    thank you both Don and bob .

The topic ‘cmdlet for enable-psremoting on remote machine’ is closed to new replies.