Monday, August 01, 2011

Powershell: Test for variable existence

If variable name is helloWorld (referenced as $helloWorld):

test-path variable:\helloWorld

return true if the variable has been defined and false if variable has not been defined.

No comments:

Post a Comment

Remember, if you want me to respond to your comment, then you need to use a Google/OpenID account to leave the comment.