Regular Expression Cheat Sheet

Below is a quick reference guide for regular expressions that I frequently use and find useful. Online RegEx debugger and library – https://regex101.com/ # Validate Base64 string. [0-9a-zA-Z\+=]{20,} # Validate Subnet in CIDR notation. ^(([01]?\d?\d|2[0-4]\d|25[0-5])\.){3}([01]?\d?\d|2[0-4]\d|25[0-5])\/(\d{1}|[0-2]{1}\d{1}|3[0-2])$ # Validate IP address range. ^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}-(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$ # Validate IP address. ^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$ # Validate an email address. \b[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}\b # Validate an … More Regular Expression Cheat Sheet

Utilising vSphere Performance Monitoring Tools – Part One: ESXTOP

The main use case for using ESXTOP is to retrieve more granular information that that provided in the vSphere Web Client in order to troubleshoot performance issues, and therefore is a better choice that using performance graphs. ESXTOP has as number of modes which are useful in a number of situations: Interactive   – workload … More Utilising vSphere Performance Monitoring Tools – Part One: ESXTOP

2014 in review

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog. Here’s an excerpt: The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 83,000 times in 2014. If it were an exhibit at the Louvre Museum, it would take about 4 days for that many people to see … More 2014 in review

PowerCLI: Consolidating virtual machine disks

In order to retrieve a list of virtual machines which are reporting t the issue ‘Virtual machine disks consolidation is needed’ we can invoke the Get-VM cmdlet to determine if a virtual machine consolidation is required. $VMs = Get-VM | Where-Object {$_.ExtensionData.RunTime.ConsolidationNeeded} To consolidate snapshots for a collection of virtual machines we can now perform the following, … More PowerCLI: Consolidating virtual machine disks