Posts

VMware Datastore Tracker

Image
I used an old script by Hugo Peeters to create this script as an "idiot light" for VMware SAN volumes.  It tracks them over time, compares to the previous one and stores the data for future processing.  I have another script that can ingest the data to produce graphs of data use over months. The script was recently updated to support the new v6 commandlets.  It produces an nice clean HTML email that has gains color coded green, losses color coded red, and the percentage free in a color scale from dark green to red. Again, the script was produced from numerous sources.  Here is a sanitized example of the email message generated by the script.  The color change in the "vCenter" column indicates data from 2 seperate vCenter instances.  Note that the vCenter instance names are hard coded half way down (I got lazy...) so they need to be edited in the config file and script. My scripts are all on the MS PowerShell Gallery now so that I'm not editing these p...

Detect current PDC and notify if it changes.

I've harped on Windows Time before and I assume it will plague me until the day I die.  We (once again) are seeing issues with time sync in our domain.  I "think" I finally got things stable but in the interim I wanted to keep an active eye on our PDC so I know if it moved to a different domain controller.  I created the below script to do that for me.   I set a recurring scheduled task that fires every 15 minutes on my task engine server.   The script uses a fixed PDC but could be tweaked to track it if it moves.  I simply wanted an "idiot light" that annoyed me if the PDC wasn't where I expected it to be.  The first 4 alerts come as detected, then it backs off to once every hour. Edit it as needed before running. Param (       [ Switch ] $Console = $false                              #--[ Set to true to enable local console result ...

Write user session data to AD

Ever wanted to be able to identify the computer a user is currently on?  Me too.  This small script can be run as a GPO logon script.  It reads the session environment variables and writes them to both the AD computer record and AD user record so you can easily find what PC the user is on. Originally I used VB scripts for this but we're trying to move away from using those.  Also I had a similar logoff script to clear out the records on the AD computer at logoff.  that way you can see who is actively logged on to any PC. In this case no external XML config file is used so the encrypted service user data in kept in the script. Param (       [ switch ] $Console = $False       ) <#======================================================================================          File Name : SessionInfo.ps1    Original Author : Kenneth C. Mazie (kcmj...