Weekend Scripter: Unexpected Case Sensitivity in PowerShell

Summary: PowerShell MVP, Mike F Robbins, discusses case sensitivity in Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Welcome back guest blogger, Mike Robbins. Mike F Robbins is a Microsoft MVP for Windows PowerShell and a SAPIEN Technologies MVP. He is a co-author of Windows PowerShell TFM 4th Edition, and is a contributing author…

3

PowerTip: Replace Non-Alphabetic Characters in String

Summary: Use Windows PowerShell to replace non-alphabetic characters in a string.  How can I use Windows PowerShell to replace a string that contains non-alphabetic characters            (such as commas and periods)?  Use the –Replace operator, and specify a regex pattern '[^a-zA-Z]', for example: $a = 'Never a foot too far, even.' $a -Replace '[^a-zA-Z]',''


Weekend Scripter: Exploring Palindrome Sentences with PowerShell

Summary: Ed Wilson, Microsoft Scripting Guy, talks about identifying palindromes that are more than a single word. Microsoft Scripting Guy, Ed Wilson, is here. One of the coolest things about palindromes is that they can be formed with sentences. It is also what makes them the most subtle. For example, whereas it is pretty obvious…


Use PowerShell to Find Palindromes

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using Windows PowerShell to find palindromes. Microsoft Scripting Guy, Ed Wilson, is here. I enjoy playing around with words. I like words that sound similar to each other, such as to, too, and two. I also like words that look alike, and sound alike but have different…


PowerTip: Use PowerShell to Display ASCII Characters

Summary: Use Windows PowerShell to display ASCII characters.  How can I use Windows PowerShell to quickly display printable ASCII characters when I am not connected            to the Internet?  Use the range operator to create a range of numbers 1 through 128, pipe it to Foreach-Object (% is the alias),        …


Generate Random Letters with PowerShell

Summary: Ed Wilson, Microsoft Scripting Guy, talks about generating random letters with Windows PowerShell.  Hey, Scripting Guy! I need to generate a string of random letters. These letters need to be five characters long, and they should be either upper case or lower case. I do not need any numbers or special characters. In fact,…


Reverse Strings with PowerShell

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using Windows PowerShell to reverse strings.  Hey, Scripting Guy! I am working with Windows PowerShell, and I need to reverse a string. I am surprised there is no reverse method in the string class. It seems like a major oversight. Anyway, can you show me how to…


Long String Running

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using a compound string command. Microsoft Scripting Guy, Ed Wilson, is here. The other day, the Scripting Wife and I headed to Nashville for a couple of speaking engagements. We decided to head through Alabama instead of going through Atlanta for a couple of reasons. We have…


Easy Parsing of Messages with PowerShell

Summary: Ed Wilson, Microsoft Scripting Guy, talks about parsing event message strings with Windows PowerShell.  Hey, Scripting Guy! I have seen people using different tools to find stuff in strings in Windows PowerShell, but it always looks complicated. Why is that? I thought Windows PowerShell was supposed to make things easier, but this looks really…


Dude It’s a String—The Video

Summary: Ed Wilson, Microsoft Scripting Guy, presents a video to talk about working with strings in Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Today I present a video where I talk about working with strings—in particular empty or null strings. I talk about the differences between empty, null, and white space in strings…