Open Hammer7407 opened 7 years ago
Needs a bit of work before merging...
Wondering if this is something that is valuable adding as well.
My goal is to get everything that we check daily in to vCheck. I modified the script just a bit to check that vSphere databases are backing up each night. Any directory not written to in 24 hours shows up in the report. Easy, but it saves me a few minutes every morning.
#Variables
$BackupPath = "\\<hostname>\G$\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup"
#Get list of directories from backup target
$BackupDirectories = Get-ChildItem $BackupPath |
Where {$_.LastWriteTime -le (Get-Date).AddHours(-24)}
$BackupDirectories
I have run in to some issues with VMware where a host stops logging to the remote syslog server for some reason and this causes it to write errors to the vCenter C drive and database several time per second; Filling up C and bloating the database. As a result, I have written a small script the queries the syslog server to find the last modified file date and report on those that have not been written to in the last 12 hours. (Something we used to check manually every morning.) I'm fairly new to PowerShell so the script could probably use some refining, but I've taken a lot from this site and wanted to give something back.
Sorry if this is not the right place for new submissions. I looked all over and could not find a good place.
-Jason