
Currently Browsing: Powershell
Oct 9, 2012
How to use PowerShell to create HTML from a Text File
Recently I was tasked with creating a Cluster Health Report for the Windows 2008 R2 Clusters. I was able to do this with PowerShell using the failovercluster cmdlets. This was outputted to a text file and emailed to the support for review daily. To expand / enhance the report it was suggested to create it in HTML format. So back to PowerShell we go and low and behold we find the ConvertTo-Html cmdlet.... read more
Sep 20, 2012
Windows 2008 R2 Cluster Report with PowerShell
You know how it is, manager love reports and really we geeks like some reports as well. Recently I was tasked to generate a health check report for some of the Windows 2008 R2 Active / Passive clusters using PowerShell. With Windows 2008 R2 cluster Microsoft has provided FailoverClusters modules as well as the deprecated cluster command. There is no per say report to check for a status on clusters. Using... read more
Aug 3, 2012
How to Backup System State with PowerShell
As tweaker’s there is always changes needed to the system to make it run to our liking and there is always the risk that those changes will break and possible have major repercussions. That’s where restore points come into play. With PowerShell there is a way to use system restore points to backup and restore if an issue does arise. This process assumes that system restore points are enabled... read more
Jan 20, 2012
Using Powershell to Parse Event Logs
Powershell is a well needed addition to Windows. For a longtime there has been Windows admins wanting a powerful and flexible scripting language similar to what Linux / Unix users have had for years, or at least I have. One of the great command line tools for Linux has been the use of commands like cat, less, more and grep as a few to parse files. Enter in Powershell for Windows. A recent need for parsing... read more
Jan 16, 2012
Using Powershell to check service and send email
Ran into an issue with services stopping for no reason and causing IIS to stop. This was happening in the middle of the night and was sporadic in nature, making it hard to find a root cause. As a band-aid I created a Powershell 2 script to check for the service, restart if not in a running state and send and email. Here is the script. # Checks for a service to be running and starts if needed. # Author: Me... read more