set-pssessionconfiguration permission issue

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of suresh krishnan suresh krishnan 2 weeks ago.

  • Author
    Posts
  • #74554
    Profile photo of suresh krishnan
    suresh krishnan
    Participant

    Dear Community

    I need your help , after upgrading powershell version from 4 to version 5 pssesion configuration permission for few service accounts went missing , i am adding them using Set-PSSessionConfiguration -Name Microsoft.PowerShell -showSecurityDescriptorUI command which has gui pop-up and then you can add the service accounts. I would like to know if this can be done via powershell with out GUI . Thanks.

  • #74567
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Definitely yes. You just need to know the "code" that represents the permissions you're trying to set. The easiest way to get that is to use the GUI once, then retrieve the session configuration and look at its properties. You'll see the security descriptor string, and you can use that with the command the next times.

  • #74756
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Did this provide any help for you?

  • #74947
    Profile photo of suresh krishnan
    suresh krishnan
    Participant

    Hi Don
    Yes it did provide some clue and i manage to find a script from ed wilson blog 🙂 , i just changed $users variable to the service account names and it worked perfectly thanks again 🙂

You must be logged in to reply to this topic.