Learn about Windows PowerShell
Summary: Learn how to find all the one-letter Windows PowerShell aliases.
How can I find all the defined Windows PowerShell aliases that are exactly one letter in length?
Use the Get-Alias cmdlet and choose a one-letter wildcard pattern:
For sure you know it already, but you can use square to limit the search range to '?' only:
CommandType Name Definition
----------- ---- ----------
Alias ? Where-Object
@Happysysadm you are correct. This is because the ? is a wild card character, and you need to tell PowerShell to find the literal character. The following also works:
PS C:\> gal '`?'
Alias ? -> Where-Object
I have a question that seems related to this, but is a little more in-depth. I am trying to convert a string of characters. Each character needs to be the next character in the character map. For instance, A gets converted to B, 1 gets converted to 2 and ` (that's the tick mark to the left of the "1" key) gets converted to _. Specifically, I need:
AbCd12` would get converted to BcDe23_
Anyone have an idea of how to accomplish this?