Jul/092
Script: Check for Orphaned HomeDirs
It seems no matter how much you try you cannot ever get those damned orphaned homedirs cleaned up. Well, this helps. Our org always has additional groups in the homedir (no, we don’t just let the users have whatever they want in there, so we have to monitor). This causes a little confusion amongst most orphaned file checkers (as there is still a group in there that resolves). Read on for the code and an example.
What this script does is it scans a directory’s subdirectories (as with many homedirs, the subdirectories are usually the AD account name). It then tries to match the subdirectory to an AD account name. If this proves that one doesn’t exist, it prompts and spits out the ACL info and a prompt to move the files. If you say yes, it moves them to the directory you specified in arg1.
Mar/080
Preparing for SCCM – enabling Secure Key Exchange
I found this interesting forum post on the msft forums. This code will help you change all your sites to require secure key exchange.
here’s the post: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2796017&SiteID=17
Oct/070
Change SMS Cache Size
This script will change the sms cache size.
Usage Example: cscript change-sms-cache.vbs 1000 d:\
Note: size is in MB
Aug/070
Check for reboot
call checkpendingstatus
sub CheckPendingStatus
Set ComputerStatus = CreateObject("Microsoft.Update.SystemInfo")
If ComputerStatus.RebootRequired Then
wscript.echo "This computer has a pending reboot."
Else
wscript.echo "this computer does not have a pending reboot."
End If
End sub
Aug/070
Ping a list of machines from txt
This vbscript pings machines from a text file:
change the two variables for your input and output txt files:
strPATHout = “C:\pingstatus.txt”
strPATHin = “C:\pinglist.txt”

