PowerShell-specific code smells
As you have learned throughout this book, PowerShell is an interesting creation. It is a powerful scripting language that can be used to write complex solutions as well as short and quick scripts. The language design is also somewhat unique because of the PowerShell pipeline, which is a central feature. Finally, the scope of the PowerShell language has grown tremendously over the course of the last seven or eight years, so code that was written early on will probably look primitive in light of the latest version. Here some of the large changes to the language and environment that have occurred in the various PowerShell versions:
Introduced in Version 1.0:
Functions, filters, scripts, and pipeline
Introduced in Version 2.0:
Modules
PowerShell remoting
PowerShell ISE
Advanced functions
Background jobs
Eventing
Introduced in Version 3.0:
Workflows
Scheduled jobs
CIM cmdlets
Updateable help
Simplified
Where-Object
syntax
Introduced in Version 4.0:
Desired state configuration
The...