Running windows container's command prompt in admin mode
As per the Windows documentation, the Windows Server Core has ContainerAdministrator
as the default user whereas Windows NanoServer has ContainerUser
as the default user.
Thanks to Peter's comment, I was able to connect to my container as admin using the following command-
docker exec --user ContainerAdministrator -it <container_id> cmd