Tags » Powershell-basics

and finally

If you’re old enough and seen UK TV you’ll recognise the title but this post is about using try – catch blocks.

Using try-catch this is a fairly normal construction… 433 more words

Powershell Basics

Bad practices – making scripts needlessly interactive

the PowerShell community spends a lot of time talking about best practices when using PowerShell. I’m not convinced this approach is working as we keep seeing the same bad practices coming through on forum questions. 568 more words

Powershell Basics

Function parameter validation - other validation options

Some other options you can use for validating your input include:

tests the number of values being passed to the parameter – must be within the range (including end points ) specified… 109 more words

Powershell Basics

Function parameter validation–ValidateScript

Sometimes you need a little bit more than the standard parameter validation options can provide – in that case use ValidateScript – you can write your own validation routine. 442 more words

Powershell Basics

Function parameter validation–NotNullorEmpty

A question on the forum made me realise that there is still a lot of confusion around the advanced function parameter validation options so I thought I’d spend a few posts clearing some of the confusion. 378 more words

Powershell Basics

PowerShell Scripting Best Practices

Ed Wilson is running a series on Best Practices on his Hey, Scripting Guy blog at the moment. I especially like today’s which is on simple scripts. 121 more words