Home > OS >  How to run at the CMD netsh?
How to run at the CMD netsh?

Time:03-16

C: \ Users \ wm20201105 & gt; Runas/user: DESKTOP - MUUMF9O \ administrator netsh advfirewall firewall add rule name="SNMP UDP Port 161 In" dir=In action=allow protocol=UDP localport=161
RUNAS usage:

RUNAS [[/noprofile |/profile] [/env] [/savecred |/netonly]]
/user: & lt; UserName> The program

RUNAS [[/noprofile |/profile] [/env] [/savecred]]
[/user/smartcard: & lt; UserName>] The program

RUNAS/trustlevel: & lt; TrustLevel> The program
.

I don't know where there is a problem

CodePudding user response:

I solved the

FABBY for computer name
C: \ Users \ wm20201105 & gt; Runas/user: FABBY \ administrator "netsh advfirewall firewall rule name=" add SNMP UDP Port 161 In \ "dir=In action=allow protocol=UDP localport=161"
Enter FABBY \ administrator password:

CodePudding user response:

D: \ test> runas/?
RUNAS usage:

RUNAS [[/noprofile |/profile] [/env] [/savecred |/netonly]]
/user: & lt; UserName> The program

RUNAS [[/noprofile |/profile] [/env] [/savecred]]
[/user/smartcard: & lt; UserName>] The program

RUNAS/trustlevel: & lt; TrustLevel> The program

/noprofile specified should not load the user's profile,
This will accelerate the application load, but
May cause some abnormal application is running,
/profile specified should load the user's profile,
This is the default value,
/env to use current environment instead of user's environment,
/netonly only at the specified credentials are limited to a remote access to use,
/savecred users previously saved credentials,
/smartcard if the credential is a smart card, use this option,
/user & lt; UserName> Should use the @ DOMAIN or DOMAIN \ USER
/showtrustlevels display can be used as a/trustlevel parameter
Level of trust,
/trustlevel & lt; Level> Should be enumerated in the/showtrustlevels
A level of
The program EXE command line, please refer to the following example

Example:
Runas/noprofile/user: mymachine \ administrator CMD
Runas/profile/env/user: mydomain \ admin "MMC % windir % \ system32 \ dsa. The MSC"
Runas/env/user:[email protected] "notepad " my file. TXT \ ""

Note: only when prompted, enter the user's password,
Note:/profile/netonly incompatibilities,
Note: with//savecred smartcard incompatible,

  • Related