Tag: powershell

Script: VM decommissioning, pt 1 (Decomm-PowerOffRename.ps1)

Hello there! An organization I recently did contract worth with asked for an easy method to decommission VMware VMs. They were just starting to explore automation and also self-service for the owners of the VMs. This script was to be used by the Windows Systems Admins and/or VMware Admins during their normal decommissioning process. The process before hand was entirely manual – they would get a list of VMs from their change control system, log…


Script: Run-WindowsUpdate

Here was another fun one. Recently, we deployed a system that would not be able to have it’s Windows patches delivered the same way as 99% of our other systems. It’s been a bit of a struggle to really get meaningful information out of the vendor on the patching process, in an enterprise (24x7x365) environment. I started building an entire automation sequence to be able to run these patches. It essentially shuts down everything in…


Script: Send-HTMLEmail

Good evening, One script that I wrote, that I make somewhat frequent use of, is my “Send-HTMLEmail” script. It’s simple, and makes sending an Object out via email (example: a reporting/logging object) pretty easy to do. This script takes a few parameters as input, which I’ll step you through. .PARAMETER InputObject (mandatory) Any PSOBJECT or other Table. Many of the “Get-” cmdlets in PoSh return some sort of PSObject, which can be sent to this…


Script: Remove-OldFiles

The script I am putting out here today is named “Remove-OldFiles”. As the name implies, this script will search out and remove files (with a given extension, i.e. .mkv) over a certain age threshold. This script was tested with PowerShell 4.0. One of the goals for this task was to be robust – I did not want to pin it down to a certain location, file extension, or age. This enabled my organization to setup…