Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

PowerTip: How to detect a valid Active Directory user name using regular expressions

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how use regex to detect if a string is a valid Active Directory user name. (image) The invalid characters for an Active Directory user name are and . How do I tell if a string is a valid Active Directory user name?   (image) You can treat this array of characters as a...

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. (image) 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? (image) In PowerShell, use [System.TimeZone] ...