How do I use DSC to enable psremoting?

Welcome Forums DSC (Desired State Configuration) How do I use DSC to enable psremoting?

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

3 years ago.

  • Author
  • #38660

    Topics: 24
    Replies: 8
    Points: 0
    Rank: Member

    I cannot use DSC to enable-psremoting because I do not know which registry entries need to be changed.

    This link

    has two registry keys. One I couldn't find. The other didn't change when I enabled and disabled psremoting. I therefore could not use the link to do what I need to do. How do I use DSC to enable psremoting? Or is there no declarative way?

  • #38865

    Topics: 13
    Replies: 4872
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Remoting involves a bit more than just the registry. There's also a Wsman configuration, potentially firewall exceptions, and a good bit more. Keep in mind that DSC is primarily focused at server workloads right now, and Win2012+ have Remoting enabled by default. So Microsoft just hasn't focused on making Remoting a declarative thing. I mean, obviously, you could check to see if the local Wsman: drive exists (meaning Remoting was at least set up), and run Enable-PSRemoting if not, but that's going to get a little hacky.

  • #38893

    Topics: 0
    Replies: 102
    Points: 0
    Rank: Member

    The test whether powershell remoting is enabled or not can be done using:
    1) Check if winrm service is running: Get-Service winrm.
    2) Check if endpoint is setup: Invoke-WsManAction -Action analyze -ResourceURI winrm/config/service
    3) Check if PS Plugin is registered: dir WSMan:\localhost\Plugin\microsoft.powershell
    If any of the test fails, you need to run Enable-PSRemoting to enable remoting.

The topic ‘How do I use DSC to enable psremoting?’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort