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: