Difference between revisions of "Psexec with vista"
(No difference)
|
Revision as of 13:49, 11 September 2009
Psexec.exe is a Microsoft command line program that allows users to get a remote command line and execute programs on a remote computer that runs Windows XP (and kinda Vista)
- Link to Microsoft PsTools package with Psexec.exe - download link
PsExec.exe to Windows Vista
PsExec does not (officially) support connecting to Windows Vista operating systems, HOWEVER, it is still possible if the account you connect to on the remote computer is the "Administrator" account. This is a major security hole that is opened when Psexec is used to connect to a remote command line on a Vista machine, but it does work.
Psexec remote command line to Vista can help in batch files where the .bat needs to control a remote computer. Telnet is an alternative option, but telnet does not support passwords in batch files-- psexec does.
Using PsExec to connect to a Vista machine on other users accounts (even if they are in the administrators group) does not work. You must use the administrator account to get a vista remote command line with psexec. This is the simplest way to launch programs on a remote vista machine.
Psexec Help Info
Taken directly from Psexec command line help
Usage: psexec [\\computer[,computer2[,...] | @file][-u user [-p psswd]][-n s][-l][-s|-e][-x][-i [session]][-c [-f|-v]][-w directory][-d][-<priority>][-a n,n,... ] cmd [arguments] computer Direct PsExec to run the application on the computer or computers specified. If you omit the computer name PsExec runs the application on the local system and if you enter a computer name of "\\*" PsExec runs the applications on all computers in the current domain. @file Directs PsExec to run the command on each computer listed in the text file specified. -a Separate processors on which the application can run with commas where 1 is the lowest numbered CPU. For example, to run the application on CPU 2 and CPU 4, enter: "-a 2,4" -c Copy the specified program to the remote system for execution. If you omit this option then the application must be in the system's path on the remote system. -d Don't wait for application to terminate. Only use this option for non-interactive applications. -e Does not load the specified account's profile. -f Copy the specified program to the remote system even if the file already exists on the remote system. -i Run the program so that it interacts with the desktop of the specified session on the remote system. If no session is specified the process runs in the console session. -l Run process as limited user (strips the Administrators group and allows only privileges assigned to the Users group). On Windows Vista the process runs with Low Integrity. -n Specifies timeout in seconds connecting to remote computers. -p Specifies optional password for user name. If you omit this you will be prompted to enter a hidden password. -s Run remote process in the System account. -u Specifies optional user name for login to remote computer. -v Copy the specified file only if it has a higher version number or is newer on than the one on the remote system. -w Set the working directory of the process (relative to the remote computer). -x Display the UI on the Winlogon desktop (local system only). -priority Specifies -low, -belownormal, -abovenormal, -high or -realtime to run the process at a different priority. Use -background to run at low memory and I/O priority on Vista. program Name of the program to execute. arguments Arguments to pass (note that file paths must be absolute paths on the target system)
Psexec Remote Vista Examples
Control your Windows Vista computer using these psexec command line examples
Shutdown remote vista computer using PsExec: psexec.exe \\mediacenter -u administrator -p mypassword shutdown /p /f Open notepad on a remote vista computer using PsExec: psexec \\mediacenter -u administrator -p mypassword notepad.exe
External Resources
- Microsoft Technet Psexec.exe usage - click here
- PsTools Package by Microsoft - click here