Here are some Powershell and other scripts i have developed over my time in IT.
Feel free to copy or modify if they are any help to you.
I have put them here so i always know where i can find a copy.
As with all scripts you locate on the intranet, make sure you know what you are doing prior to running the script on your production environment.