We help IT Professionals succeed at work.

Script to open cmd as a domain administrator

160 Views
Last Modified: 2017-04-11
Hello,
is this posible?
I need a simple script, to open up a command prompt as a domain administrator. Preferably without being prompted for the password. The password should be coded in to the script.

Thanks,
Bat.
Comment
Watch Question

JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
End-user support
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
I would be concerned that anyone who might find the script would be in like flint. I like better security than this, but then you may have a different view.
NVITEnd-user support
CERTIFIED EXPERT

Commented:
Correction to my prior post:
While logged on as domain admin, create a new shortcut to CMD
...should be:
While logged on as the user, create a new shortcut to CMD

The password is not saved in the shortcut itself. It is saved in the user's vault accessed via Credential Manager.
The asker should be aware of this.
Shaun VermaakSenior Consultant
CERTIFIED EXPERT
Awarded 2017
Distinguished Expert 2019
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Vikas BhatExperienced IT Infrastructure Services/operations Manager
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
Proper answers and advice provided