More PowerShell Fun

Published 17 October 07 11:33 AM | john 

Still struggling to gain traction with PowerShell.  I've stopped myself running the CMD prompt by default, and I've installed it on all my test VPC machines.

Firstly, I recommend you download the Windows PowerShell Graphical Help File.  It's an old school .chm file, but you can search it.  Don't underestimate how useful this is when learning new stuff.

Also, I totally hate the magic behind env: prefixed variables.  They are basically a secret back door to the processes environment variables.  It seems that the the processes environment variables are mirrored into variables starting with $env:  So $env:path gets you the PATH and $env:pathext gets you PATHEXT.  This is not documented anywhere that I can find.   What's important is that these environment variables are still important in many cases.  So $env.path is still the search path for programs, and $env.pathext is still appended to any program you type without an extension.

I grabbed a copy of Windows PowerShell Unleashed from the Microsoft library.  It's not a bad introduction.  I don't think it's much of a long term reference book though.  There are too many important details missing (like the one above).

Filed under: ,

Comments

No Comments
Anonymous comments are disabled