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:
Network Administrator Download
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 XP:
http://www.intelliadmin.com/index.php/2008/12/enabling-file-and-printer-sharing-in-windows-xp/
Windows Vista, 2008:
http://www.intelliadmin.com/index.php/2008/12/enabling-file-and-printer-sharing-in-vista/
Windows 7, 2008 R2:
http://www.intelliadmin.com/index.php/2009/08/windows-7-the-admin-share/
Windows 8, 2012:
http://www.intelliadmin.com/index.php/2012/10/windows-8-enable-the-admin-share/
From a script on any version of windows (Must run as administrator):
Enable the admin share from a script
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
{ 5 comments… read them below or add one }
Hi Steve,
We have a bunch of old Windows XP machines that desperately need to be defraged. Will this work on Windows XP machines?
Thanks
Hi Tracy,
Yes, we have tested it under Windows XP, and it works without issues.
Any chance this will work under Windows 2000? I have a call manager server from cisco, and it would be great if I could defrag it remotely.
Hi Bob,
We have not tested it under Windows 2000, but I think it should work fine. I believe defrag had the same command line options in 2000.
Just want to say thanks for the plugin updates steve. This tool has been great.