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…