1. Lệnh Ping : Cú pháp: Code: ping ip/host [/t][/a][/l][/n]



tải về 1.67 Mb.
Chế độ xem pdf
trang71/92
Chuyển đổi dữ liệu18.05.2022
Kích1.67 Mb.
#52014
1   ...   67   68   69   70   71   72   73   74   ...   92
Cac lenh co ban trong DOS

 
Examples:
List everything in the application event log on \\workstation64 from the last 24 hours: 
psloglist \\workstation64 -h 24 application 
“Events, dear boy, events” ~ British Prime Minister Harold Macmillan (answer to 'what is the 
biggest problem in politics'?) 


PsPasswd
 (
PsTools

Change account password 
Syntax 
pspasswd [[\\computer[,computer[,..] | @file
[-u user [-p passwd]]] Username [NewPassword
Options: 
computer The computer on which the user account resides. 
Default=local system
-p passwd Specify a password for user (optional). Passed as clear 
text. 
If omitted, you will be prompted to enter a hidden 
password. 
-u user Specify a user name for login to remote 
computer(optional). 
@file Execute the command on each of the computers listed in 
the file. 
Username Name of account for password change. 
NewPassword The new password, If ommitted a NULL password is applied. 
This tool allows administrators to create a batch file that will run against multiple computers to 
perform a mass change of the administrator password. 
 
Examples:
Change the password for user JDoe on \\workstation64 
C:\> pspasswd \\workstation64 jdoe password567 
“Drunk with power isn't the same as being drunk with booze” ~ 
Craig Ferguson
 
PUSHD
 
Change the current directory/folder and store the previous folder/path for use by 
the 
POPD
 command. 
Syntax 
PUSHD [drive]path 
PUSHD 
Key 
drive The drive to switch to 
path The folder to make 'current' (UNC names accepted) 
If the 
drive
is not specified, the current drive will be assumed. 
If neither 
drive
nor 
path
are specified PUSHD will just display a list of previous pathnames
you may switch back to any of these by using 
POPD
 one or more times. 
If the path specified does not exist, PUSHD will return %errorlevel% =1 
Run as Admin 
When a batch script is 'Run as Admin' in Vista or Windows 7, the current directory will be set 
to 
C:\windows\system32\
.
Using the following pushd command at the start of the script will restore the normal current 
directory. 
This works by setting the current directory to the location of the batch script, using the 
%0 
parameter
 


pushd "%~dp0"
UNC Network paths 
When a UNC 
path
is specified, PUSHD will create a temporary drive map and will then use that 
new drive.
The temporary drive letters are allocated in reverse alphabetical order, so if 
Z:
is free it will be 
used first. 

tải về 1.67 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   67   68   69   70   71   72   73   74   ...   92




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương