NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

Get-nadiskowner - feature request

JGPSHNTAP
3,597 Views

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"

1 REPLY 1

JGPSHNTAP
3,597 Views

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

Public