1

The goal is to delete the temporary internet files on a remote computer.

start psexec -u domain\username  -p password  -s \\xxx.xxx.xxx.xxx
cmd cd C:\Documents and Settings\USERACCOUNT\Local Settings\Temporary Internet Files

Which is connecting to the remote computer but just opening to c:windows\system. I am then able to cd to that directory and use del /f /s /q *.* to delete all the problem files.

I tried using psexec \\computer cmd /c del fileName but had even less luck with that.

4

4 回答 4

1

Why bother cd'ing to directory first? This should work:

psexec \\1.2.3.4 -u "domain\username" -p "password" cmd /c del /f /s /q "C:\Document and Settings\USERACCOUNT\Local Settings\Temporary Internet Files"
于 2012-11-28T17:04:15.273 回答
1

I finally got it to work using

psexec -u domain\user  -p password \\xxx.xxx.xxx.xxx -s cmd /c rd "C:\Documents and Settings\%USERACCOUNT%\Local Settings\Temporary Internet Files\Content.IE5\" /s /q

which connects to the remote server, goes straight to the directory I want and proceeds to delete the particular temp internet files folder that's causing issues without bothering me at all.

于 2013-02-15T22:39:25.870 回答
0

Your command is okay but missing the server name

psexec \\\servername -u ...
于 2013-08-27T15:51:40.247 回答
0

Use the below command to create a directory in remote location.

psexec \\\IPAddress -u username -p Password cmd /c mkdir c:\testfolder

于 2014-05-07T07:13:11.750 回答