Search the Community
Showing results for tags 'pstools'.
Hi all, So, this script shouldn't work without a password for a user, but it does. Using PSTools and being on the same network as the target PC. Set the %Time% to be in a couple of minutes . . . XCOPY C:\Foo.bat \\%Hostname%\c$ /E /S /C /Y psexec \\%Hostname% -s -c -f cmd.exe /c "Schtasks /create /RU %UserID% /SC ONCE /TN %NameOfTask% /TR c:\Foo.bat /ST %Time% This actually successfully runs Foo.bat on a user's PC, as the %UserID% set in the script, but doesn't actually prompt for their password. It just runs. I've even managed to use this to send a command to copy files, from a folder t
Hi all, I'm using PSEXEC to map a drive on a user's machine remotely, amongst running various other CMD commands to amend registry files etc. I am running PSTOOLS on my machine under an admin account, because I cannot use PSTOOLS otherwise. On running the following script, as an example of one of the CMD commands I am trying to run, it runs it as me (as in, an admin). However, I don't want it to do this, as this doesn't map the drive for the user. I want the script to run the CMD command as the currently logged on user, not as me. :MapDrive psexec \\%IP% -s -i -c -f -d cmd.exe /s /c "NET