set-pssessionconfiguration permission issue

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.

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.

Did this provide any help for you?

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

https://blogs.technet.microsoft.com/heyscriptingguy/2010/11/18/use-powershell-to-set-security-permissions-for-remoting/