powershellpowershell-core

How can I read help documentation for operators like -replace in PowerShell?


I normally use the Get-Help cmdlet to read documentation for individual cmdlets, like:

Get-Help -Name Connect-AzAccount

But how can I read documentation for operators, like -replace?

In bash, I would do help for - I'm looking for equivalent functionality in pwsh


Solution

  • PowerShell help also has "about" topics; the ones you need for your example are about_Operators and about_Comparison_Operators. To see which "about" topics are available, use Get-Help about_*. You may need to Update-Help before the help will be available. See the online help for Get-Help.

    ETA: If you need to run Update-Help, you will need to do it in an elevated (run-as-admin) PowerShell.