While logged in to a Windows Desktop as a normal domain user (jonny) I wanted to be able to run the Active Directory Users and Computers snap-in as a Domain Admin user (adm-jonny) to do so requires using the ‘runas’ command.
When I had first tried using the ‘runas’ command I had problems related to permissions e.g. “The requested operation requires elevation”despite adding the Domain Admin user (adm-jonny) as an administrator on the local machine and running the command prompt as administrator and even using the runas command first to create a command prompt as the local administrator:
runas /user:MACHINENAME\administrator cmd
I then checked the user I was running as with whoami:
Although I would have expected this to have worked I kept getting error messages about elevation – so I had to resort to disabling UAC.
To disable User Access Control in Windows 7 click: Start > Control Panel
Then type uac into the upper right search box
Next click on ‘Change User Account Control settings’
Note: Make sure you reboot after making this change!
Once I had disabled UAC I was able to successfully run the following command in a command prompt:
runas.exe /user:DOMAIN\adminusername "mmc c:\Windows\System32\dsa.msc"
So next I created a shortcut for the command, right-clicking the desktop and choosing New > Shortcut:
Next I entered the command with full paths to files:
c:\Windows\System32\runas.exe /SAVECRED /user:DOMAIN\adminusername "c:\Windows\System32\mmc.exe c:\Windows\System32\dsa.msc"