1. First script will send out the magic packet to wake pcs
2. Second script will run the defrag for all the pcs that are listed in the text file using psexec
psexec @pc_list.txt -u administrator -p password -d -e defrag.exe c:
3. Finally using psshutdown from sysinteral to shut down pc listed int the text file.
psshutdown -u administrator -p password -s -c @pc_list.txt
I am using windows scheduler to run the script at night.
I think the current script doing quite well and very simple to use. However when i think of improving the script, pcs should shut down right after defrag is finished.
Wondering if there is easy way to improve the script so the pcs shut down right after defrag is finish.
if i don't use psexec to do remotely following script should work but can't figure out how to use with psexec.
Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script. Many of these have come from the web or adaptations from snippets I find on the Web. Periodically I add to them when I come…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online.
The email signature template has been downloaded from:
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…