Searching for a String in Environmental Variables in Powershell

I’ve updated the post through feedback in the comments: Regex compare on strings for Get-Variable is Where-Object -Match. So, the closest parallel to the following bash code: set | grep “Users” is the following Powershell: Get-Variable | Where-Object { $_.Value -Match “Users” } or shortened: gv | ? {$_.Value -Match “Users”} Original Post, with Updates […]