I'm following Getting Started With PowerShell thanks to Packt's free book program (patience is required, but they will eventually offer you free books on nearly every technical topic known to man - it's been a great source). I've now also installed PowerShell on a Mac, and have some observations ...
powershell_ise ("Integrated Scripting Environment," described as "not quite an IDE" - I may be paraphrasing) isn't available in the Mac or Linux distribution, perhaps because it wasn't open-sourced or possibly because it's a graphical tool and was harder to port.
Start-Process cmdlet has made the transition to the Mac, the
Start-Service cmdlet doesn't appear to exist. It's ironic then that a listing of aliases (
sasv as an alias for
Start-Service. So the clean-up is still in-process. I suppose I could file a bug report ... The book mentions the output of
Get-Command | Measure-Object running to a 1400 count on Windows (that's 1400 things PowerShell considers executable commands, and that's not counting stuff on your $PATH-equivalent), but on Linux and Mac it's in the 350 neighbourhood.
Select-String -? | less gives you basic help (equivalent to
get-help Select-String) with the '-?' being applicable to any cmdlet. There are several related help commands, but the one I think I like the best is
get-help Select-String -examples | less which gives examples of the command's use. Also interesting (but not obvious) is
Get-Help about_aliases | less. Tab completion doesn't seem to apply to the 'about_...' topics on Mac or Linux. And a command that evidently works in Windows (per the book)
Get-Help about_* returns without error but also without output on Linux. So the content seems to be there, but it's only accessible if you already know the name.
The shell has tab completion, and syntax colourization on the command line which is kind of neat. But the alternating capitalization (
get-help is the same as
Get-Help, but if you type get-he<Tab> it will helpfully change to Camel-Case for you) is weird and slightly obnoxious on a case-sensitive system like Linux.
Get-Verb -? told me it didn't have the full help and I should run
Update-Help. If I hadn't heard of this command I wouldn't have run it - but it's explained in the book and this is apparently how M$ likes to ship the help files. So I ran
Update-Help, after which running
Get-Verb -? STILL returned this:
... Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help. -- To download and install Help files for the module that includes this cmdlet, use Update-Help. ...
Get-Command -Verb Get will list every command the shell knows that starts with "Get" (it's a very long list). Likewise you can search for Nouns:
> Get-Command -Noun Process CommandType Name Version ----------- ---- ------- Cmdlet Debug-Process 188.8.131.52 Cmdlet Get-Process 184.108.40.206 Cmdlet Start-Process 220.127.116.11 Cmdlet Stop-Process 18.104.22.168 Cmdlet Wait-Process 22.214.171.124
Get-Help -ShowWindow Get-Process should (apparently) open a new window showing the help text: this fails silently on both Mac and Linux.