Hi,
I want to know if we can use the if statement with the not operator in windows Powershell.
Hi,
I want to know if we can use the if statement with the not operator in windows Powershell.
You can have a look at these two webpages!
http://blog.highspeedweb.net/2008/10...-if-statement/
and
http://computerperformance.co.uk/pow..._statement.htm
Here is what you want to do with If statement & not operator!
http://blog.flaphead.dns2go.com/arch...8/14/3509.aspx
Hope this helps!
btw... when your using if() blocks it ALWAYS evaulates to $true or $false...
if $true then {} happens. if $false the Else{} happens. You dont need -eq
so
if($result){"it was true"}else{"it was false"}
Bookmarks