In the screenshot below you can see I changed to the “c:\pstools” directory to run the psexec command. You should see PsExec return the version and command syntax. Open the windows command prompt and switch to the pstools directory, then type psexec and press enter. Let’s test the installation to make sure PsExec is working. Tip: For convenience, you can also copy the PsExec.exe to a system path (such as c:\windows\system32), this will allow you to run the exe without having to change directories from the command prompt. I’ve copied it to the root of c: (Example c:\pstools). Unzip the downloaded file (PSTools.zip) and copy it to a path on your hard drive. PsExec is part of the PsTools package provided by Microsoft. In this section, I’ll walk through installing PsExec on my local computer. Set-NetFirewallRule -DisplayGroup “Remote Service Management” -Enabled True -Profile domain -RemoteAddress "192.168.100.10" How to Install PsExec I also use the -RemoteAddress option to limit which IP addresses can connect to the remote computer. This is not required but PsExec will run extremely slow when this service is blocked. Step 3: Allow Remote Service Management (Optional) In the GUI the Remote IP address settings are on the scope tab. New-NetFirewallRule -DisplayName 'UDP/137' -Profile -Direction Inbound -Action Allow -Protocol UDP -LocalPort -RemoteAddress 192.168.100.10 New-NetFirewallRule -DisplayName 'TCP/445' -Profile -Direction Inbound -Action Allow -Protocol TCP -LocalPort -RemoteAddress 192.168.100.10 If another IP address tried to connect to the remote computer the Firewall would block it. In this example, I’m only allowing the IP “192.168.100.10” to make connections to the remote computer for the file and printer sharing service. Tip: Use the -RemoteAddress option to limit connections from authorized systems.
0 Comments
Leave a Reply. |