Discussions
Categories
Groups
Advertisement
Child Item
Home
Topics
Technology & Internet
Computers & Technology
Computers & Technology
Remote shutdown with shutdown.exe credentials?
BrokenArrows
Every now and then at work i need to remotely reboot a server. I use the following command line:
shutdown -m \\ComputerName -r -f -t 0
However this wont work unless my current username has rights on the remote computer.
I get around this my mapping a network drive which prompts me to enter my credentials for the remote server and then the shutdown command will work as the windows system now as stored come credentials for the remote server.
Now the questions is.... How can i tell a command line program to use certain credentials when attempting a command?
I dont like having to map a drive every time i do this.
Find more posts tagged with
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
Advertisement
Advertisement
Comments
Bogger77
if mapping drive works
can you use a batch file, with net use to map the drive, and then shutdown ?
MrECameraman
Easiest is probably the runas command. runas /noprofile /user:domain\userid cmd then run the command within that. Alternatively psshutdown from sysinternals (
http://technet.microsoft.com/en-gb/sysinternals/bb897541.aspx
) has that facility built in