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.