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, ∼2444🔥, 0💬
Popular Posts:
What is services.exe process - Services and Controller app? Process services.exe is part of the Wind...
What are default Startup Programs on a Windows 7 Home Premium computer? If you are running a Windows...
I have several computers. How can I share my Internet Explorer favorites between two computers? Favo...
Can I disable Windows service "HTTP SSL" to speedup my computer? Windows service "HTTP SSL" - This s...
What is the scheduled task "\Microsoft\Windows\User Profile Service\HiveUploadTask" on my Windows 7 ...