August 16th, 2013

PowerTip: Find Case-Specific Strings by Using PowerShell

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find case-specific strings.

Hey, Scripting Guy! Question How can I find a particular, case-sensitive word in a string?

Hey, Scripting Guy! Answer Use Select-String and specify the –CaseSensitive switch:

“Hey Scripting Guy”,”hey scripting guy” | Select-String -Pattern ‘hey’ -CaseSensitive

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.