Prev | Current Page 428 | Next

John Paul Mueller

"Administering Windows Server 2008 Server Core"

In this case, a script file is simply a list of commands that you want NetSH
to perform. You place these commands in a text file and pass them to NetSH to execute. This utility
uses the following syntax:
netsh [-a AliasFile] [-c Context] [-r RemoteMachine]
[-u [DomainName\]UserName] [Command | -f ScriptFile]
The following list describes each of the command line arguments.
-a AliasFile Specifies the alias file to use. An alias file contains a set of strings and their associated
NetSH equivalents. You can use the alias in place of the corresponding NetSH command.
This feature also allows you to map older commands to the appropriate NetSH command.
-c Context Defines the context of the command that you want to run. A context refers to a
specific helper DLL.
Command Specifies the NetSH command to execute. The command is helper DLL specific.
-f ScriptFile Specifies the name of a file that contains NetSH commands. A script file is
simply a text file that contains NetSH commands one after another. You can use the pound (#)
symbol followed by text to create script file comments. Use the NetSH Dump command to display
a sample script. Because the script is long, you might want to use redirection to send the output
to a file (see the ???Employing Data Redirection??? section of Chapter 14 for details).


Pages:
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
zakłady bukmacherskie Kalkulator kredytowy Wczasy nad morzem uchwyt lcd zrębki