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, ∼2837🔥, 0💬
Popular Posts:
Can I remove startup application "ISUSPM.exe - InstallShield Update Service Update Manager" to speed...
How to use IMDisplay to display an image file? If have image file called wizard.jpg and want to use ...
What is "Pml Driver HPZ12" in my Windows 7 service list? And how is "Pml Driver HPZ12" service relat...
How to change the Bluetooth device name on your Windows XP system? If you want to change the Bluetoo...
Daylight saving time has been changed since March 2007 in US, Canada and Mexico. How do I update my ...