I have got two machines (machine1 & machine2). My task is to execute few commands remotely via PSEXEC from machine1 to machine2. Sadly these machines are from different network domains. Admin Share is enabled in both the machines.
machine2 can be accessible only by establishing to VPN on machine1. PSEXEC works fine when I establish VPN on the machine1 to access machine2. I am also able to access Admin share via run ---> \\ip\Admin$
Tricky part here is to execute the PSEXEC without establishing VPN on machine1. To achieve this I have disabled the firewalls on machine2. Now without VPN, I can connect machine2 from machine1 via RDP (Remote Desktop), but not able to successfully run PSEXEC nor able to access Admin share on machine2.
Below is the command/error:
Command: PSexec \\{machineip} -u {username} -p {password} cmd
Error:
Could not access {machineip}
The network path was not found
Guess as Admin share on machine2 is not accessible without Establishing VPM PSEXEC fails to execute. If the above guess is valid, I would like to know how to access Admin Share from a different domain/network.