Tag Archive

PowerShell Show VM having snapshots

Published on 28/05/2010 By admin

By default a param minus 30 days. Save it to a *.ps1 file and it ready to use. param ($Age = 30) Connect-VIServer localhost$vm = Get-VM$snapshots = Get-Snapshot -VM $vmWrite-Host -ForegroundColor Red “Old snapshots found:”foreach    ($snap in $snapshots) {    if ( $snap.Created -lt (Get-Date).AddDays( -$Age )){        Write-Host “MachineName:” $snap.VM “Name: ” $snap.Name ” Size: ” [...]

WSUS Database cleanup/update using PowerShell

Published on 06/07/2009 By jewe

Using Powershell to cleanup the WSUS database, free disk space increased 12 GB. #Region VARIABLES # WSUS Connection Parameters: # YOUR SERVER NAME [String]$updateServer = "SERVER NAME" [Boolean]$useSecureConnection = $False # Port number [Int32]$portNumber = 8530 # Cleanup Parameters: # Decline updates that have not been approved for 30 days or more, are not currently [...]