PowerShell regex crash course – Part 3 of 5

Summary: Thomas Rayner, Microsoft Cloud & Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell. Hello! I’m Thomas Rayner, a proud Cloud & Datacenter Management Microsoft MVP, filling in for The Scripting Guy! this week. You can find me on Twitter (@MrThomasRayner), or posting on my blog, workingsysadmin.com. This week, I’m…


PowerTip: How to detect phone numbers using regular expressions

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to use regex to detect if a string is a phone number. I have an array like $phoneornot = @(‘780-123-4567’, ‘780 321 6548’, ‘notme’, ‘this is 2 num’), and I need to know which array items are phone numbers. How can I do this? You can…


PowerShell regex crash course – Part 2 of 5

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell. Hello! I’m Thomas Rayner, a proud Cloud and Datacenter Management Microsoft MVP, filling in for The Scripting Guy! this week. You can find me on Twitter (@MrThomasRayner), or posting on my blog, workingsysadmin.com. This week, I’m presenting a…


Part 2 – Install .NET Core and PowerShell on Linux Using DSC

Summary: Learn how to configure and use PowerShell, Bash, and desired state configuration (DSC) with Linux. Today, Cloud and Data Center MVP Stefan Roth returns for Part 2 of his three-part series about how to configure and use PowerShell, Bash, and desired state configuration (DSC) with Linux. Take it away Stefan … My previous post installed…


PowerTip: How to escape characters in a string using regular expressions

Summary: Cloud & Datacenter Management MVP, Thomas Rayner, shows how escape characters for use in regex. Is there a way to escape characters in a string automatically for use in regex?  Use the [regex]::escape() method to automatically escape characters in a string so you can use them in regex. [regex]::escape(‘something. in here (needs) escaping’) something\.\…


PowerShell regex crash course – Part 1 of 5

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell. Hello! I’m Thomas Rayner, a proud Cloud and Datacenter Management Microsoft MVP, filling in for The Scripting Guy! this week. You can find me on Twitter (@MrThomasRayner) or posting on my blog, workingsysadmin.com. This week, I’m presenting a…


Scripting Guys at Ignite 2016 in Atlanta

SUMMARY: Ed Wilson, Microsoft Scripting Guy, talks about the Scripting Guys booth at Ignite 2016 in Atlanta. Good morning everyone. Ed Wilson, Microsoft Scripting Guy, here. So, the day has finally arrived – after literally months and months of planning, Ignite 2016 in Atlanta has arrived. Well, actually it arrived earlier with the Pre-Con’s yesterday…

0

PowerTip: Use PowerShell to retrieve the date and time of the given time zone ID

Summary: Use PowerShell to pull out specify TimeZone data from an object. I have data retrieved from an external source that contains different time zone IDs like W. Europe Standard Time, AUS Eastern Standard Time, etc. How can I get the current date time value of it by using PowerShell? In PowerShell, use [System.TimeZone] and…