Using the runas command...

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
Looking for a few tips with the runas command..

For example, I was trying to release/renew the IP address of a computer while a user with restricted access was logged in.

I can get ipconfig to flash up on the screen (thats one problem, it starts a new cmd window, it doesnt just print to the current one), but when I add a switch it says "RUNAS ERROR: Unable to run - ipconfig/all 87: The parameter is incorrect."

I've tried:
runas /user:myusername@ourdomain "ipconfig/all"
and
runas /user:myusername@ourdomain ipconfig/all

Both give the same error.. Any advice?

Microsofts RUNAS details
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Yeah, just do a quick:

runas /user : Domain\username cmd.exe

it will spawn a new command shell and you can run whatever you need to your hearts content.



edit: added the spaces before and after the : so it wouldn't display as a smiley.
 

Jzero

Lifer
Oct 10, 1999
18,834
1
0
It should be "ipconfig /all" (note the space). This will still cause the program to launch in a new window and close upon completion, however. I can't figure out how to get around that...
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: Jzero
It should be "ipconfig /all" (note the space). This will still cause the program to launch in a new window and close upon completion, however. I can't figure out how to get around that...

Uh.

read my post above.