Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBookV2
Script Library
Twitter Grid
Featured Posts
Dreaming in PowerShell
Don Jones
Code MarkUp Tool
Directory
The Lonely Administrator
»
All Tags
»
parameter
»
Scripting
(
RSS
)
Browse by Tags
Share
|
Recent Posts
Rename Hashtable Key Revised
PowerShell Scripting with [ValidateCount]
PowerShell Scripting with [ValidateLength]
PowerShell Scripting with [ValidateSet]
PowerShell Scripting with [ValidateScript]
Archives
May 2013 (9)
April 2013 (10)
March 2013 (6)
February 2013 (8)
January 2013 (15)
December 2012 (5)
November 2012 (7)
October 2012 (5)
September 2012 (2)
August 2012 (3)
July 2012 (4)
June 2012 (8)
May 2012 (11)
April 2012 (18)
March 2012 (2)
February 2012 (10)
January 2012 (12)
December 2011 (10)
November 2011 (15)
October 2011 (12)
September 2011 (4)
August 2011 (9)
July 2011 (8)
June 2011 (6)
May 2011 (10)
April 2011 (8)
Tags
CommandLine
Conferences
Friday Fun
FridayFun
Function
functions
Get-WMIObject
Google Plus
Group Policy
hashtable
Hyper-V
objects
Out-Gridview
Pipeline
PowerShell
Powershell 3.0
PowerShell ISE
PowerShell v2.0
ScriptBlock
Scripting
Training
Validation
Windows Server
WMI
Write-Host
View more
hashtable
Pipeline
PowerShell
PowerShell v2.0
ScriptBlock
ValidateRange
Validation
Rename Hashtable Key Revised
Last week I posted an advanced PowerShell function to rename a hashtable key. As usual, the more I worked with it the more I realized it was missing something – namely the ability the take a pipelined object. My original version assumed you had...
Published
Thu, Jan 01 2013 8:54 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
Pipeline
,
parameter
,
hashtable
PowerShell Scripting with [ValidateCount]
Here’s another parameter validation attribute you might want to use in your PowerShell scripting and functions. If your parameter can take an array of values, you might want to limit that array to a certain size. For example, your parameter …...
Published
Thu, Apr 04 2012 8:38 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
PowerShell v2.0
,
parameter
,
Validation
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...
Published
Fri, Apr 04 2012 11:11 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
parameter
,
Validation
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()]....
Published
Mon, Apr 04 2012 7:38 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
PowerShell v2.0
,
parameter
,
Validation
PowerShell Scripting with [ValidateScript]
The last few days we’ve been looking at parameter validation attributes you might use in a script of function. Yesterday I wrote about [ValidateRange] and demonstrated how you might use it. That attribute works fine for any values that can …...
Published
Thu, Apr 04 2012 8:57 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
ScriptBlock
,
parameter
,
Validation
PowerShell Scripting with [ValidateRange]
After my post yesterday on using the ValidateScript attribute with PSCredentials, I thought you might find it helpful to have a brief discussion on some other parameter validation attributes such as [ValidateRange()]. You can use this attribute if you...
Published
Wed, Apr 04 2012 11:01 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
parameter
,
ValidateRange
Copyright 2012 PowerShell.com. All rights reserved.