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, 1653🔥, 0💬
Popular Posts:
Can I disable Windows service "OracleMTSRecoveryServic e"to speedup my computer? Third party applica...
How to verify if your system is connected to the Internet? Windows system has two commands "ipconfig...
Summary of suggested services settings for Windows XP Pro SP1 system - Part III Continue from Part I...
How to remove REFIEBAR.DLL - Microsoft Research Extra Toolbar Button and Extra Tools Menu Item for I...
How do I move the licenses for the songs that I purchased from an online store to my new computer? T...