cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kamranfalahat
Engaged Sweeper
When I think about the following should do the task just fine
cmd.exe /k "\\{computer}\C$\Windows\System32\ipconfig.exe /flushdns"
However, when I run the action, it will perform it on my own machine and not the targeted machine.
I was wondering if anyone could be kind enough to help =D

Cheers
4 REPLIES 4
showtime33
Engaged Sweeper II
kamranfalahat wrote:
When I think about the following should do the task just fine
cmd.exe /k "\\{computer}\C$\Windows\System32\ipconfig.exe /flushdns"
However, when I run the action, it will perform it on my own machine and not the targeted machine.
I was wondering if anyone could be kind enough to help =D

Cheers





try this....

{actionpath}psexec \\{computer} ipconfig /flushdns

(put psexec in the action path)

cheers
Anonymous
Not applicable
It's quite simple to do it using wmic. Try this:
wmic /node:"{computer}" process call create "cmd.exe /c ipconfig /flushdns >> c:\temp\outputflushdns.txt"


If everything is fine you can check something like this in the DOS window where you run it:
Executing (Win32_Process)->Create()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
ProcessId = 2692;
ReturnValue = 0;
};


And to check if the command runs successfully check for the existante of the file \\{computer}\c$\temp\outputflushdns.txt (you can manage some scripts to open this output where you run it). Mine shows:
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
Salamine
Engaged Sweeper III
You can't run remote commands on remote computers like that. Third party software is required to be able to do that.

http://technet.microsoft.com/en-us/sysinternals/bb896649

-Sal
ThomasAnderson
Engaged Sweeper
what operating system are you using......?
If you are using windows 7 than make sure you have turn off, password protectced sharing form the advance setting under internet connection.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now