PowerTip: Find Case-Specific Strings by Using PowerShell

PowerTip: Find Case-Specific Strings by Using PowerShell

  • Comments 2
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Excellent

  • @Aleksandar thank you. I am glad you liked it.