2. Install and Update Software. To ease this seemingly never-ending task without needing the user interface on a remote system, leverage PsExec. To install an MSI package located locally and named “install.msi,” run the following command: psexec.exe \\REMOTE –i –s "msiexec.exe /i install.msi" -c install.msi. Unlike the previous command, this introduces the -c switch, which tells PsExec to copy the file to the remote system.
3. Pass encrypted credentials. Our current user may not have the rights necessary on a remote system. In this case, we can use PsExec to pass an encrypted credential to the remote system to execute our command. To run an interactive remote command prompt as a different user, run the following command: psexec \\REMOTE cmd.exe -i -u domain.local\admin -p password. The introduction of the -u switch for the user and the -p password switch allows us to execute as a different user.
4. Open a graphical application remotely. PsExec makes it simple to launch a graphical application remotely. In this case, let’s open up notepad remotely for an end-user to record information. To do this, run the following command: psexec \\REMOTE -i notepad.exe -d. By specifying the -d disconnect switch, PsExec will end the session once notepad is launched. As you can tell, PsExec is an incredibly useful tool.