none
Enter-PSSession with RunAsAdministrator option RRS feed

  • Question

  • Hi,

    After I Enter-PSSession in to the container with RunAsAdministrator option, if I get [Environment]::UserName property it says it is "SYSTEM" rather than Administrator.

    Is this right behavior? How to correctly get the Administrator privileges within powershell session of the container?

    Thanks,

    Rasheed

    Wednesday, December 16, 2015 9:06 PM

All replies

  • This is the expected behavior.  If you need to run an application as a specific user account - you can do so using "runas" inside the container. Note, the local Administrator account is disabled inside the container - so you will need to enable it first if you are planning to use it.

    This posting is provided AS IS with no warranties, and confers no rights. You assume all risk for your use.

    Tuesday, December 22, 2015 9:29 PM