I am trying to install the Windows Enterprise WDK on a Docker image based on windowsservercore. The application installs by unziping and I have already done that and committed that image to Docker. Now I need to run a script that sets environment variables. According to the Enterprise WDK install instructions I must run this script as administrator. I've done this directly on my desktop machine and it works file. Within the Docker Container, the default login user is
PS C:\> whoami
user manager\containeradministrator
I've tried enabling the admin account.
PS C:\> net user administrator /active:yes
The command completed successfully.
PS C:\> net user administrator Pa$$w0rd
The command completed successfully.
I try to start a shell as administrator, but the user does not change.
PS C:\> runas /user:administrator powershell
Enter the password for administrator:
Attempting to start powershell as user "C597C386289A\administrator" ...
PS C:\> whoami
user manager\containeradministrator
And if I run my script it fails to have set any of the environment values specified in the script.
Suggestions?