PsExec is one of the tools in the excellent PsTools package suite . It is a command line tool allowing the execution of processes on a remote system and transfer the results of operations to the console (to your computer) To work PsExec needs on the local and remote computer file and printer sharing and remote system service should be enabled and also default administrative share Admin $.
To start, download PsTools to your computer and then unpack to a directory eg c: \.
Then enter the command line (cmd), go to the directory c: \ PsTools and we can use psexec.exe.
Generally, if you have administrative privileges for easest use, you can copy files in the directory PsTools to% systemroot% \ system32.
This enables us regardless of our position in the hierarchy of folders, use the commands contained in the package.
Examples of use psexec:
The name of the remote computer (SCA)
- Run a command prompt on the remote computer
psexec \ \ cmd SCA
- Run the show network settings on a remote computer and pass this information to local console command line
psexec \ \ SCA ipconfig / all
- These commands were performed assuming that you run from an account that has administrative privileges on the second computer also. In another situation, we must specify the administrator login and password.
Here is an example remote shutdown.
psexec \ \ SCA-u username-p password shutdown
- The following command will copy the program to the remote computer and run it interactively
psexec \ \ SCA-u username-p password-cc: \ jakas_sciezka \ program.exe
- Setting the firewall on a remote computer to allow you to connect remote desktop
psexec \ \ SCA - u user-p password netsh firewall set service enable remotedesktop
- Displays detailed information about processes on a remote computer
psexec \ \ SCA - u user-p password tasklist / v
Brak komentarzy:
Prześlij komentarz