Friday, October 31, 2008

Defrag Your Servers Remotely with PowerShell

Another quick and dirty script.  I've got a couple servers that are running applications that suffer from disk thrashing, and are running Windows Server 2003.  A defrag tends to noticeably increase performance.  With this script I can kick off a defrag from my desk whenever I want.






5 comments:

Anonymous said...

Your script does not work. Why publish data that does not work

Unknown said...

My script does work. If you can tell me what error you're seeing, maybe I can help you get it to work for you as well.

Anonymous said...

I have to agree with Anonymous, It didn't work. There were no error codes to reveal any error. If there are any special cmd line items that may help run it please post them. I've also tried to run it from within the PS ISE and from a straight cmd line. :(

albina N muro said...

Enables automatic discovery of Tomcat/JBoss/WebSphere/WebLogic application servers deployed in customer's environment. Hosted Lync Providers

Anonymous said...

The script works just fine.

You need to ensure that you call the function at the end of the script however.

If you read the script (and have a working knowledge of PowerShell), I'm sure you'll figure this out too!