Партнерка на США и Канаду по недвижимости, выплаты в крипто
- 30% recurring commission
- Выплаты в USDT
- Вывод каждую неделю
- Комиссия до 5 лет за каждого referral
net use [devicename] [\\computername\sharename[\volume]] [password]
[/user:[domainname\]username] [[/delete] | [persistent:{yes | no}]]
net use devicename [/home[password]] [/delete:{yes | no}]
net use [persistent:{yes | no}]
Executing net use without options will produce a display of all currently connected shared resources.
Table A.61 defines the options that are valid for use in all syntax formats of the net use command.
Another syntax format of the net use command is net use persistent{yes | no}. When yes is used, all current connections will be reestablished at subsequent logons. When no is entered, no subsequent connections will be saved and therefore will not be reestablished at subsequent logons.
net use Command Examples
To disconnect from the printer designated by LPT2:, enter
net use lpt2: /delete
To connect to the shared resource g:\Sales\Contacts as the user bosco, enter
net use g:\Sales\Contracts * /user:bosco
The asterisk forces a password to be entered at a prompt before allowing the connection to occur.
NET USER COMMAND
The net user command allows an administrator to perform many of the user management tasks from the command line or command prompt. It adds, modifies, and deletes user accounts, and it displays information about a specific user account or lists all user accounts on the system. Executing this command at a Windows Server 2003 will update the user accounts database on the primary domain controller. That data is then replicated to the backup domain controllers.
There are three syntax formats for this command:
net user [username [password]] [options] [/domain]
net user username password /add [options] [/domain]
net user username [/delete] [/domain]
Table use Command Options | ||
Option | Qualifier | Description |
devicename | Enters the name of the device to be connected or disconnected. Acceptable values are D: through Z: for disk drives, LPT1: through LPT3: for printers, or an asterisk (*) to assign the next available device designation. Executing the command net use devicename displays information about the connection made to the shared resource, devicename. | |
\\computername \volume sharename | Enters the name of the computer that controls the shared resource for computername, which can be no longer than 15 characters, or for the shared resource for sharename. The \volume qualifier contains the name of a volume on a NetWare server and can only be used if either Client Services for NetWare or Gateway Services for NetWare is installed. | |
password | Enters the password necessary to access the shared resource. Using an asterisk (*) in place of the password forces a prompt for the password, which is often preferred since the password is not visible on the screen when it is entered in response to the prompt. This option can only be used after the \\computername\sharename option. | |
/user:name | Makes the connection using the user, name, instead of the currently logged on user. A domain different from the current one can be specified as part of name (/user:domainname\name). | |
/delete | Disconnects the connection to the shared resource and removes it from the list of persistent connections. This option cannot be used in conjunction with /persistent. | |
/persistent:{yes | no} | Identifies whether a connection is persistent or not. Entering yes {yes | no} saves each connection made as a persistent connection so that it can be reestablished at each login. Entering no {yes | no} stops saving the current connection and all future connections so that only existing connections will be reestablished at the next logon. The current persistent setting remains the default until it is changed. Once a connection is considered persistent, it can only be removed from the recurring list with the /delete option. | |
/home | Connects the user to his home directory. |
Without parameters or options, net user will display a list of the user accounts set up for the current system. With only the username parameter, it will display information specific to that user account. The display contains such information as the expiration date of the account, password-related information such as expiration dates, the name of the user's logon script and profile, the user's home directory, the date of the last logon, and the name of the account's local and global groups. Tables A.62 and A.63 define the parameters and the options available for net user.
net user Command Examples
The following command sets up a user named emilyg, prompting for a password. This user is permitted to log on Monday through Friday from 8:00 A. M. to 6:00 P. M. from the workstations named incy, sales, techsupp, and mktg.
net user bosco * /add /times:M-F,08:00-18:00
/workstations:incy, sales, techsupp, mktg
To delete the user bosco from the system, enter
net user bosco /delete
Table user Parameters | |
Option | Description |
username | Enters the name of the user account to be added, changed, deleted, or displayed. A user name can contain a maximum of 20 characters. |
password | Either sets up a password for a new account or changes the password for an existing account. The password can consist of a maximum of 14 characters and must conform to the password specifications defined by the net accounts command. Entering an asterisk (*) instead of the actual password forces a prompt for the password, which in this instance will not be displayed on the screen while it is entered. |
/domain | Specifies the command be executed on the primary domain controller of the current system's domain. This parameter should be used only from Windows Server 2003 workstations that are members of a Windows Server 2003 domain. |
/add | Adds the user name to the user accounts database. The password parameter is required with this function. |
/delete | Deletes the user name from the user accounts database. |
Table user Command Options | |
Option | Description |
/active:{yes | no} | Enters yes to activate the user account or no to disable it and thus prohibit the user from accessing the server. The default is yes. |
/comment:"text" | Enters a comment up to a maximum of 48 characters for text. |
/countrycode:nnn | Enters the numeric value for the operating system country code for nnn in order to display the user's help and error messages in a different language. Zero signifies the default. |
/expires:date | Enters the date the account will expire. Acceptable values are never (the account will never expire) or a date in the default format defined by the country code. Examples of date formats are mm/dd/yy, dd, mm, yyyy, mm, dd, yy. The month can be either numeric or alphabetic; the year can be 2 or 4 digits. Either slashes or commas can be used to separate the components of the date. |
/fullname:"name" | Enters the user's full name for the variable name. |
/homedir:path | Enters the path for the user's home directory for the variable path. The path specified must already exist. |
/homedirreq:{yes | no} | Enters yes to specify that a home directory is required or no if not. |
/passwordchg:{yes | no} | Enters yes to identify whether a user can change his password or no if not. The default is yes. |
/passwordreq:{yes | no} | Enters yes to require a password for a user or no otherwise. The default is yes. |
/profilepath:path | Enters the pathname for the user's logon profile for path. |
/scriptpath:path | Enters the pathname of the user's logon script for path. |
/times:time | Enters the times of day that a user can log on to the system. Acceptable values include all (a user can always log on), a space or blank (a user can never log on), and days and times in the format day, hour. Days are the days of the week either spelled out or abbreviated as M, T, W, Th, F, Sa, Su; time can be either in 12- or 24-hour format. When 12-hour format is used, use A. M. or P. M., am, pm, a. m., or P. M. to designate. Days and times are separated with commas. If multiple days and times are listed, they are separated with semicolons. There should be no spaces. For example, /times:M,8am-5pm,12pm-8pm;W,13:00-17:00. |
/usercomment:"text" | Enters a comment for the variable text. |
/workstations:name(s) | Substitutes for name a list of workstations from which a user can access the network. A maximum of eight workstations can be listed, separated by commas. An asterisk (*) allows the user to log on to the network from any computer. |
To deactivate rather than delete user bosco, enter
net user bosco /active:no
NET VIEW COMMAND
The net view command displays the resources being shared on the computer. Depending on the parameters selected, the output is a list of computers in the current domain or a list of all domains in the network. The syntax can be one of the following:
net view \\computername
net view /domain:domainname
Entering net view without parameters will produce a list of all computers on the network. Specifying a computer name for the \\computername parameter will produce a listing of all resources that are shared with that computer. Using the /domain:domainname parameter and specifying a particular domain name will produce a list of all resources shared with the computer in the named domain. Omitting the domain name will produce a list of all domains in the network.
A special format of this command will display all the servers available on a NetWare network:
net view /network:nw
PRINT COMMANDS
Within Windows Server 2003 a printer can be attached to the local system or to the network. This section outlines the steps necessary to create a printer, send files to print, determine the status of a print job, manage printer operations, and define printer properties.
Creating a Printer
Here creating a printer means installing it so that it is accessible to both users and applications. Windows Server 2003 simplifies this process with the Add Printer Wizard, which can be accessed in three ways:
· From the My Computer icon, double-click the Printers folder.
· Select Start
Settings
Control Panel, then double-click the Printers folder.
· Select Start
Settings
Printers.
Printers can be created as local or as remote. To create a local printer, from the Add Printer Wizard:
1. Click My Computer and click Next.
2. Choose the port the printer is connected to from the Available Ports list; then click Next.
3. Choose the manufacturer and printer from the lists provided; click Next. (Before clicking Next, you may click Have Disk in order to install the printer driver at this point. If a printer driver is necessary, you will have an opportunity to install it later as well.)
4. Enter a name for the printer that your users will understand and recognize. You may also designate whether this printer will be considered the default for the system. Click Next.
5. If the printer is to be shared over the network, select Shared and either accept the shared printer name displayed or enter one that you prefer. Remember, if this printer is to be available to MS-DOS and Windows 3.x users, be sure the name is consistent with their file-naming restrictions of eight characters before a period and three characters after (filename. ext).
6. If sharing the printer over the network, select the operating systems that will be accessing it. Click Next.
7. Click Yes to print a test page; No to bypass it.
8. Click Finish to complete the installation.
9. At this point, the wizard may request that you insert the media that contains the print drivers for the operating systems that you selected. Just follow the instructions on the screen.
Creating a remote printer is often referred to as "connecting to a network printer." This printer can be new or it may have already been installed elsewhere on the network. To create a remote printer, access the Add Printer Wizard and follow these steps.
1. Select Network Printer Server; click Next.
2. The Connect to Printer window displays. From the Shared Printers list, choose the network printer to which you wish to connect, then click OK.
3. Click Finish to complete the installation.
Sending Files to Print
To ensure that a file is printed correctly, we recommend using the print facility provided by the application that created the file. From within a Windows-based application, select the Printer icon to send a file to the default printer. To select a specific printer, select File
Print from the menu bar.
Files recognized by Windows Server 2003 can be dragged and dropped on the icon for the desired printer. To accomplish this, select Start
Settings
Printers to display the printer icons. Then, using either Explorer or the My Computer windows, select a file and drag it to the appropriate icon in the Printers window; release the mouse button to drop it.
IPR COMMAND
The lpr command enables a user to print to a computer that is running the LPD server. Thus, a Windows Server user can print to a UNIX printer. The syntax is
lpr –Sserver –Pprinter [options] filename
Enter for filename the name of the file to be printed. All other parameters and options are described in Table A.64.
Table A.64. lpr Options | ||
Option | Qualifier | Description |
-S | server | Enters the name of the computer where the printer is attached for the variable server. This is a required parameter. |
-P | printer | Enters the name of the printer in place of the variable printer. This is a required parameter. |
-C | class | Enters the class of the print jobs in order to list the contents of the banner page. This is an optional parameter. |
-J | jobname | Enters name of this print job in place of the variable jobname. |
-O | option | Describes the type of file to be printed. The default is a text file. A lowercase l is entered to signify a binary file, such as a PostScript file. In this case, the option is –Ol. |
PRINT COMMAND
The print command enables the user to print a text file in the background. The syntax is
print [/d:device] filename(s)
Executing print without options or parameters will display a list of the files currently in the print queue.
The first parameter, /d:device, is optional and designates the name of the print device. Acceptable values are LPT1, LPT2, and LPT3 for parallel ports; COM1, COM2, COM3, and COM4 for serial ports; and \\servername\sharename for a net work printer where servername is the name of the server and sharename is the name of the shared printer resource. The default value for /d:device is PRN, which is the same as LPT1, the first parallel port.
The filename(s) parameter is optional and should include the name of the file or files to be printed. Multiple file names are separated by a space. If necessary, a drive designation and pathname may be entered in the format drive:path\filename.
As a note of interest, PostScript files require the copy, not the print, command. For example, copy file. ps lpt1: prints a PostScript file on LPT1.
Print Status
To determine the status of files in the print queue, select Start
Settings
Printers and double-click the appropriate printer. A status window for that printer will display containing the following information for each print job printing or waiting to print:
· Document name. At a minimum, the name of the file being printed and possibly the name of the application that created the file.
· Status. If nothing displays in this field, the file is waiting to print; otherwise, the status is displayed— printing, spooling, paused, or deleting.
· Owner indicates the logon name of the owner of the document.
· Pages indicates the number of pages in the document.
· Size indicates the size of the document in bytes.
· Submitted indicates the date and time the print request was submitted.
· Port indicates the port where the printer is connected.
LPQ COMMAND
The lpq command displays status information for a print queue on a host computer running the LPD server. The syntax is
lpq –Sserver –Pprinter [–l]
Table A.65 lists the options for the lpq command.
Table A.65. lpq Command Options | ||
Option | Qualifier | Description |
-S | server | Enters the name of the computer with the printer attached for the qualifier server. This is a required parameter. |
-P | printer | Enters the name of the printer to identify the queue to display status information. This parameter is required. |
-l | Included only when a detailed status report is desired. |
NET PRINT COMMAND
The net print command displays information about printer queues and printer jobs. It also deletes, suspends, or reactivates print print has two formats, the first of which is
net print \\computername\sharename
This format displays, for each print queue, name, number of jobs, and status. For each job in the queue, it displays user name, job number, size, and status. Table A.66 defines the parameters.
The second format is
net print [\\computername] job# [options]
This format either displays information about a specific job number or enables you to control network print jobs. The \\computername parameter is optional and should contain the name of the computer sharing the printer queue. The job# parameter is required and should contain the number of the print job in question. This number is part of the print queue listing that can be displayed using the net print \\computername command. The options are described in Table A.67.
Table print Parameters | |
Option | Description |
\\computername | Enters the name of the computer sharing the print queue. |
\sharename | Enters the name of the specific print queue. This parameter is optional; when not entered, the net print \\computername command displays all print queues on this computer. |
Table print Command Options | |
Option | Description |
/delete | Deletes job# from the printer queue. |
/hold | Puts a hold on a job# that is waiting in the print queue so that it will not print but stays in the print queue until it is released or deleted. |
/release | Releases a job# that has been put on hold. |
net print Command Examples
To display all print jobs in the marketing print queue on the computer incy, enter
net print \\incy\marketing
To delete print job 12 from that computer, enter
net print \\incy 12 /delete
Managing Printer Operations
Once a document is in the print queue, several operations can be executed to pause and resume printing, restart documents from the beginning, and cancel documents.
PAUSING AND RESUMING A PRINTER
Pausing a printer stops printing but permits files to be accepted into the print queue. To pause a printer:
1. Select Start
Settings
Printers.
2. Double-click the icon for the desired printer.
3. From the selected printer's window, select Printer
Pause Printing; the title bar will display "Paused."
To resume printing, select Printer
Pause Printing from the printer's window.
PAUSING AND RESUMING PRINTING
To suspend printing:
1. Select the desired document from the printer's window.
2. From the menu bar, select Document
Pause; the status column for the document will display "Paused."
To resume printing
1. Select the paused document from the printer's window.
2. From the menu bar, select Document
Resume.
RESTARTING AND CANCELING A DOCUMENT
To restart the printing of a document from the beginning:
1. Select the document to be restarted from the printer's window.
2. From the menu bar, select Document
Restart.
To remove a document from the print queue (i. e., cancel it):
1. Select the document to be canceled from the printer's window.
2. From the menu bar, select Document
Cancel.
Defining Printer Properties
In order to define or change the default behavior of a printer, the printer properties must be modified. To do this, first select Start
Settings
Printers and right-click the desired printer icon. From the menu that displays, select Properties. Another way is to double-click the desired printer icon to display the printer's window and then, from the menu bar, select Printer
Properties.
The Properties window contains six tabs. A brief description of each follows.
· General contains comments and printer location information. It also enables you to configure a separator page or a print processor, or to print a test page.
· Ports enables the addition, deletion, and configuration of ports. It can be used to create a printer pool that consists of more than one printer device of the same type connected to the same print server.
· Scheduling defines when the printer is available for printing. It also has options to configure the spooler operation, such as whether to start the printing of the document before it is completely spooled.
· Sharing defines whether a printer is shared over the network.
· Security defines or displays parameters for permissions, auditing, and ownership.
· Device Settings displays a hierarchical list of the printer's hardware features and allows them to be changed based on the content of the printer driver.
LPD Service
The LPD Service (lpdsvc), referred to as the TCP/IP Print Service in Windows Server 2003, enables printers to print jobs from remote clients such as UNIX systems. As part of the Resource Kit, it is installed as follows: Select Start
Settings
Control Panel
Network
Services. Within the Services window, select Add. From the Network Service list, select Microsoft TCP/IP Printing, then click OK. At this point, follow the instructions on the screen, including inserting the Windows Server 2003 Resource Kit CD-ROM so that additional files may be installed. Once the files have been installed, restart the computer.
To start the LPD Service, select Start
Settings
Control Panel
Services. From the list, select TCP/IP Print Server, then click Start.
SEARCH COMMANDS
Windows Server 2003 provides commands for locating files and folders as well as a specific string of text within files. This section covers some of them.
find Command
The find command searches for a specified string of text in one or more files and displays any matches. The syntax is
find [options] "string" filename(s)
The "string" parameter is required and consists of the string of text that you wish to match. As in the above syntax example, the string must be enclosed in quotes and must be found in files in its entirety. It cannot be interrupted with a carriage return.
The filename(s) parameter is the name of one or more files to be searched, with the drive designation and path name included if necessary. Multiple file names should be separated by a space, and cannot be designated with wildcard characters. In place of a file name, the find command can accept input from the keyboard, from another command via a pipe, or from a file via a redirection command (<).
The options available for the find command are defined in Table A.68.
Table A.68. find Command Options | |
Option | Description |
/c | Outputs a count of the lines that match the string instead of the lines themselves. This option should not be used in conjunction with the /n option. |
/i | Ignores differences between uppercase and lowercase when trying to match the string. |
/n | Includes the line number of the matched line when displaying it. |
/v | Displays the lines that do not match the string. If used in conjunction with the /c option, displays the number of lines that did not match the string. |
FIND COMMAND EXAMPLES
Enter the following to find all files on a disk that contain the word "auto":
|
Из за большого объема этот материал размещен на нескольких страницах:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |


