12 Things that Powershell can do (so you don't have to)

12 Things that Powershell can do (so you don't have to)

12 Things that Powershell can do (so you don't have to) Refactoring powershell to delete code.

Garbage in, Garbage out

  1. CmdLetBinding Write-Verbose Write-Debug Write-error

Write-Host Write-Output

  1. What If

  2. Switch

  3. Parameter Sets

  4. Parameter validation ValidateNotNullOrEmpty()]

  5. Validation Set ["Prod", "Staging", "Dev"] Validation script

  6. Write Output Objects

  7. Functional style - using pipes

  8. Measure Command

  9. Binding Command

  10. Execution of script, function or command line tool & - not using strings

  11. External functions - psm1 or ps1 Easy imports - dot sourcing

13 Test - Pester to test your code.

Import from dll.

Write .Net dll to consume from powershell

Application

Core library Console application GUI application Web application Powershell interface