The Big Book of PowerShell Gotchas
  • ReadMe
  • About this Book
  • Format Right
  • Where is the __ command?
  • PowerShell.exe isn't PowerShell
  • Accumulating Output in a Function
  • ForEach vs ForEach vs ForEach
  • Tab Complete!
  • -Contains isn't -Like
  • You Can't Have What You Don't Have
  • Filter Values Diversity
  • Not Everything Produces Output
  • One HTML Page at a Time, Please
  • Bloody. Awful. Punctuation.
  • Don't Concatenate Strings
  • $ Isn't Part of the Variable Name
  • Use the Pipeline, Not an Array
  • Backtick, Grave Accent, Escape
  • These Aren't Your Father's Commands
  • A Crowd isn't an Individual
  • Commands' Default Output Can Lie
  • Properties vs. Values
  • Remote Variables
  • New-Object PSObject vs. PSCustomObject
  • Running Something as the "Currently Logged-in User"
  • Commands that Need a User Profile May Fail When Run Remotely
  • Writing to SQL Server
  • Getting Folder Sizes
Powered by GitBook
On this page

About this Book

PreviousReadMeNextFormat Right

Last updated 7 years ago

by (mostly) Don Jones

PowerShell is full of "gotchas" - little things that just get in your way and are hard to figure out on your own. This short book is intended to help you figure them out and avoid them.

This guide is released under the Creative Commons Attribution-NoDerivs 3.0 Unported License. The authors encourage you to redistribute this file as widely as possible, but ask that you do not modify the document.

Getting the Code The EnhancedHTML2 module mentioned in this book can be found in the . That page includes download instructions. PowerShellGet is required, and can be obtained from PowerShellGallery.com

Was this book helpful? The author(s) kindly ask(s) that you make a tax-deductible (in the US; check your laws if you live elsewhere) donation of any amount to to support their ongoing work.

Check for Updates! Our ebooks are often updated with new and corrected content. We make them available in two ways:

  • Our main, authoritative , with a repo for each book. Visit

  • On , where you can read them online, download as PDF, EPUB, or MOBI (login required), and "purchase" the books to make a donation to DevOps Collective. You can also choose to be notified of updates. Visit

LeanPub can also notify you when we push updates. Our main GitHub repo is authoritative; repositories on other sites are usually just mirrors used for the publishing process. LeanPub always contains the most recent "public release" of any book.

https://www.powershellgallery.com/packages/EnhancedHTML2/
The DevOps Collective
GitHub organization
https://github.com/devops-collective-inc/
LeanPub
https://leanpub.com/u/devopscollective