When attempting to execute remote commands between Windows XP machines in a workgroup environment, PSExec frequently throws the frustrating "Access is Denied" error despite correct credentials. This occurs even with:
- Simple file sharing disabled
- Security policy set to Classic model
- Valid administrative credentials
The most common oversight in workgroup environments is the lack of identical local accounts. For PSExec to work:
1. Create matching local admin accounts (same username/password) on both machines
2. Ensure the accounts are members of Administrators group
3. Verify the accounts have "Act as part of OS" privilege (secpol.msc)
Windows XP's built-in firewall often blocks PSExec traffic. These ports must be open:
netsh firewall set portopening TCP 445 ENABLE
netsh firewall set portopening TCP 139 ENABLE
net start "Remote Registry"
XP machines may need NTLM authentication adjustments. Add this registry entry on both machines:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"LmCompatibilityLevel"=dword:00000001
Sometimes the standard syntax fails due to workgroup limitations. Try this enhanced command:
psexec \\targetPC -u targetPC\adminUser -p password -h -i 1 cmd.exe
Key parameters:
- -h: Run with elevated token
- -i 1: Interactive session
- Full PCname\username format
When all else fails, use network monitoring to verify authentication attempts:
net use \\targetPC\IPC$ /u:targetPC\adminUser password
psexec -accepteula \\targetPC -s cmd /c "echo test > C:\test.txt"
While these solutions work for legacy XP systems, consider upgrading to modern alternatives like:
# PowerShell Remoting (Windows 7+)
Enable-PSRemoting -Force
Enter-PSSession -ComputerName targetPC
When attempting to execute remote commands using PSExec between Windows XP machines in a workgroup environment, many administrators encounter the frustrating "Access is Denied" error despite having correct credentials. This typically occurs even after configuring basic security settings like disabling Simple File Sharing and setting the security policy to Classic mode.
Beyond the standard settings you've already configured, several additional steps are necessary for PSExec to function properly:
1. Both machines must have the same administrative username/password combination
2. The $ADMIN share must be accessible (net use \\computername\admin$)
3. The Remote Registry service must be running on the target machine
4. Proper firewall exceptions must be configured
Before troubleshooting PSExec specifically, verify basic connectivity:
:: Test basic connectivity
ping otherComputer
:: Test administrative share access
net use \\otherComputer\admin$ /u:otherComputer\adminUser
PSExec requires multiple authentication steps to work properly. The complete sequence looks like:
1. Authenticate to ADMIN$ share (SMB)
2. Copy PSEXESVC.exe to target system
3. Create and start service
4. Connect to named pipe for command execution
A failure at any step will result in "Access is Denied". The most common failure points are steps 1 and 2.
These commands can help isolate where the authentication is failing:
:: Enable verbose logging
psexec \\otherComputer -u domain\user -p password -d -accepteula -v cmd.exe
:: Alternative authentication test
psexec \\otherComputer -u otherComputer\adminUser -p password -h -i -d cmd.exe
Windows XP's built-in firewall often blocks the necessary ports. Ensure these exceptions exist:
:: Required ports for PSExec
TCP 445 (SMB)
TCP 139 (NetBIOS)
TCP/UDP 135 (RPC)
After all configurations, your successful command should look like:
psexec \\otherComputer -u otherComputer\adminUser -p password -h -d -c -f \\server\share\script.bat
Key parameters:
-h
- Run with elevated privileges
-c
- Copy specified file to remote system
-f
- Force overwrite of existing files