Domanda

I am trying to clear IE cache of a remote computer by using the following script in Powershell

$computer= read-host "computer name" psexec \\$computer -i 0 cmd /c RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

It runs on the remote computer (the user can see it running) but does not clear cache of the logged on user.

I've also tried to copy a batch file containing the command RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351 on to the logged on user's desktop and then running it

$computer= read-host "computer name" $user = read-host "User ID" copy C:\test.bat \\$computer'\C$\Documents and Settings\'$user'\Desktop' PsExec \\$computer -i 0 cmd /c "C:\Documents and Settings\$user\Desktop\test.bat"

Still no joy

If the user runs the batch file himself it clears his cache.

I just basically want to clear the IE cache of the logged on user remotely.

Any help will be highly appreciated.

Cheers

Ronnie

È stato utile?

Soluzione

It's incredibly difficult to impersonate a user without knowing their password (imagine the security implications!). In my experience it's easier to run it as either a logon or logoff script using group policy.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top