Author Archives: Jeffery Hicks

Convert Boolean Values

First, let me state right off the bat that what I have here should be for very special use cases and is NOT something I feel you need to be using at all. Now the use case: You are preparing … Continue reading

Posted in Scripting | Tagged , , , | 7 Comments

PowerShell Scripting with [ValidateLength]

In continuing the exploration of parameter validation attributes, today we’ll look at [ValidateLength()]. You can use this attribute in your PowerShell scripting to validate that a parameter value is at least a certain length and no more and a certain … Continue reading

Posted in PowerShell, Scripting | Tagged , , , | 5 Comments

PowerShell Scripting with [ValidatePattern]

I’ve been writing about a number of parameters attributes you can include in your PowerShell scripting to validate parameter values. Today I want to cover using a regular expression pattern to validate a parameter value. I’m going to assume you … Continue reading

Posted in PowerShell v2.0, Scripting | Tagged , , , | 3 Comments

PowerShell Scripting with [ValidateSet]

Today we’ll continue our exploration of the parameter validation attributes you can use in you PowerShell scripting. We’ve already looked at [ValidateRange] and [ValidateScript]. Another attribute you are likely to use is [ValidateSet()]. You can use this to verify that … Continue reading

Posted in PowerShell, PowerShell v2.0, Scripting | Tagged , , , | 6 Comments

Friday Fun: 13 More Scriptblocks

In celebration of Friday the 13th I thought I would offer up a menu of 13 more script blocks. If you missed the first course, you can find the original 13 scrptblocks here. I’m not going to spend a lot … Continue reading

Posted in Friday Fun, PowerShell, Scripting, WMI | Tagged , , , , , , | Leave a comment