I am using Windows servercore container that has ContainerAdministrator and ContainerUser users.
At build-time, its easy to switch between the two users with USER user
However, at runtime. I also require to run operations with both elevated and non-elevated operations. I tried searching around but couldn't find a way to do this. Both starting as:
- ContainerAdministrator - run operations as non-elevated
- ContainerUser - run operations as elevated