Subscribe

Get-nadiskowner - feature request

Unless Im missing something, (totally possible)

can get-nadiskowner where disks are unowned, the value is null, which is true, b/c there is no owner, but can it be similiar to the cli where it states "not owned"

Re: Get-nadiskowner - feature request

The way i've gotten around this so far was the following

$a = get-nadiskowner | group owner

$globalarray = @()

$a | % {

$custom = new-object psobject

if ($_.name -eq "") { $var = "unowned"} else { $var = $_.name}

add-member -inputobject $custom -membertype noteproperty -name "Filer" -value $var

add-member -inputobject $custom -membertype noteproperty -name "# of Drives" -value $_.count

$globalarray += $custom

}

$global | ft -autosize

Filer      # of Drives

-----      -----------

filera         76

filerb         83

unowned    24