After upgrading to a windows 7 VM at work, I was having trouble getting pstools commands to authenticate on remote machines. After much trial and error, I realized some curious behaviour with psexec. Obviously, when connecting to a remote machine, I would try to use the ‘-u’ switch to specify my administrative account, but would always get ‘access is denied’. Of course, all of the normal things should be checked: simple sharing turned off, $ADMIN share working… you know…
The issue was apparently that if I log into my workstation as a non-administrative user, but try to issue pstools commands as an administrator, it fails because Microsoft wants me to log into my workstation and work logged with my domain admin account.
Take a look at this example using psexec: On windows 7, running ‘cmd’ as your non-admin user, if you type in the command:
1 2 3 4 5 6 7 8 9
- Hit start
- Type “cmd”
- Hold down ‘shift’ and right-click on the ‘cmd’ in the start menu
- Select ‘run as different user’.
- Type in your administrative credentials. Use the same ones you will use in the psexec command.
Now you should have your command line window open. If you run the same command as earlier:
1 2 3 4 5 6 7 8 9 10 11
Now you’re in!