Collections:
Other Resources:
Comparison Operations in Windows PowerShell Scripts
How to use comparison operations in Windows PowerShell scripts? Can I write "$a > 0"?
✍: FYIcenter.com
No, you can not use "$a>0" as a comparison operation in Windows PowerShell scripts.
You must use PowerShell comparisonoperators given below:
-eq Equal -ne Not equal -ge Greater than or equal -gt Greater than -lt Less than -le Less than or equal
Here are some examples of how to use PowerShell comparisonoperators:
$a = 2 $b = 3 "Is a < b? "+($a -lt $b) "Is a <= b? "+($a -le $b) "Is a > b? "+($a -gt $b) "Is a >= b? "+($a -le $b) "Is a == b? "+($a -eq $b) "Is a != b? "+($a -ne $b)
⇒ Logical Operations in Windows PowerShell Scripts
⇐ Invoke Object Methods in Windows PowerShell Scripts
2016-10-30, ∼2751🔥, 0💬
Popular Posts:
How to connect your computer to a wireless router? Here are the steps of how to connect your compute...
What is Apache server? Apache server is an open-source free Web server software that runs websites. ...
A collection of 7 tutorials on Internet connections with wireless routers covering: What are require...
Can I disable Windows service "Smart Card Helper" to speedup my computer? Windows service "Smart Car...
What is the "csrss.exe" process on windows 7? Is the "csrss.exe" process a virus? Can I terminate th...