Forrest logo
back to the Get-Alias tool

where-object:tldr:39757

where-object: Filter aliases by its name.
$ Get-Alias | Where-Object -${Property} ${Name} -${eq} ${name}
try on your machine

This command is used in PowerShell to search for aliases that match specific criteria. Here's what each part of the command does:

  • Get-Alias: This is a cmdlet that retrieves all the defined aliases in the current PowerShell session.

  • |: This is a pipe symbol, used to pass the output of the previous command as input to the next command.

  • Where-Object: This cmdlet is used for filtering objects based on specific conditions.

  • ${Property}: This is a placeholder for the name of the property you want to filter on. You need to replace ${Property} with the actual property name, such as Name, Definition, or CommandType.

  • ${Name}: This is a placeholder for the value you want to match in the specified property. You need to replace ${Name} with the actual value you are looking for.

  • -eq: This is an operator that signifies equality. It is used to compare the property value to the specified name.

  • ${name}: This is a placeholder for the value you want to match in the specified property. You need to replace ${name} with the actual value you are looking for.

To use this command, you need to replace ${Property} with the desired property, ${Name} with the specific value to match, and ${eq} with the appropriate operator (such as -eq, -like, etc.) depending on the comparison you want to perform.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the Get-Alias tool