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, ∼2396🔥, 0💬
Popular Posts:
How to see all startup applications on your Window system? If you want see all startup applications ...
Can I remove startup application "WZQKPICK.exe - WinZip Quick Pick" to speedup my computer and reduc...
How to install Windows 7 Service Pack 1 (SP1)? I have the SP1 file downloaded. If you have the Windo...
What is PHP? PHP is a widely-used general-purpose scripting language that is especially suited for W...
What is the scheduled task "\Microsoft\Windows\WDI\ ResolutionHost"on my Windows 7 computer? "\Micro...