PowerShell things to memorize

PowerShell uses -gt and -lt instead of > and <. It uses -eq and -ne rather than == and != to test for whether two objects are equal or not

PowerShell uses backquote as the escape character, newline character is denoted `n rather than \n and a tab is denoted `t rather than \t.

If you want to call a function with three arguments, the correct syntax is MyFunction a b c are not delimited by parentheses and commas except when you call methods on .NET objects from PowerShell, use parentheses and commas just as you would in C#.

Using the Out-GridView cmdlet in Windows PowerShell 2.0. From there can you can do searches, sorts, filters, etc. Calling the Script:  PS C:\> [xml]$ca = Get-SPCustomAction   or    PS C:\> $ca.CustomActions.CustomAction | Out-GridView

 

 

 

.

Advertisements