This week Tim asked:
“How do I run Defrag remotely using Network Administrator?”
This is a good question. Normally you can execute any batch file, or script you want just using the remote execute plugin.
Defrag.exe, and other tools built into Windows are different. Since the file is located under c:\windows\system32, Windows will try to be smart and redirect 32 bit apps to a 32 bit version
Network Administrator uses a 32 bit service to execute, and this in turn causes a call to defrag to fail when trying to execute it remotely…since there is no 32 bit version of it on 64 bit windows.
We did find a trick to get around it. On Windows 7 and higher, there is a hidden environment variable named %sysnative% that will allow you to call the 64 bit version of any windows tool from a 32 bit exe.
Using our new found knowledge, we built a plugin that allows you to run defrag remotely, and across many machines at a time.
You can just analyze:
Run a full defrag, or run defrag without waiting:
If you forgot that you were running a defragmentation, it won’t let you run it more than once:
If you wait for the results, it will show you the output:
Get your copy of Network Administrator from here:
For Network Administrator to do its work, it needs file and printer sharing open. Microsoft has disabled this by default.
These articles will walk you through enabling it:
Windows Vista, 2008:
Windows 7, 2008 R2:
From a script on any version of windows (Must run as administrator):
One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools