PowerShell for Windows Admins

May 6 2013   4:20AM GMT

Scripting Games–integer parameters



Posted by: Richard Siddaway
Tags:
PowerShell
Scripting Games

I keep seeing parameter constructs like this:

[int]$age = ’90′

Why set the parameter to an integer and then set the default as a string. PowerShell will convert but it just doesn’t make sense.

All you need is

[int]$age = 90

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: