change expressions -eq to...not eq


currently i’m building powershell script need expressions.

 

what have this

get-clusteravailabledisk | ?{ $_.size -eq 1073741824}

it shows disk size of 1073741824 if want see disk smaller 1073741824 or between 1073741824 , 9073741824

also guidance nice. 

 

get-clusteravailabledisk [-inputobject <psobject>] [-cluster <string>] [<commonparameters>]

 

 

cluster    : mvpcluster01

name       : cluster disk 4

number     : 5

size       : 10485760000

partitions : {}

id         : 0x58733c5e

 

cluster    : mvpcluster01

name       : cluster disk 9

number     : 8

size       : 1073741824

partitions : {}

id         : 0x58733c43


greetings, robert smit [mvp] http://fiberman.spaces.live.com/

help about_comparison_operators

-eq = equals
-ne = not equal
-gt = greater than
-ge = greater or equal
-lt/le = less than/or equal
etc etc

for example:

$a = 5
$b = 10
$c = 7

$c -lt $b
true
$c -gt $a -and $c -lt $b
true
$c -gt $b
false

justin



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Domain migration ERR3:7075 Failed to change domain affiliation, hr=8007054a This operation is only allowed for the Primary Domain Controller of the domain

2008 Windows Deployment Server Properties Error

How do a find data in one file, search for it in another file and if not found, write a custom message to another file