Need help with object properties

[ Edited ]

All, how do you get object properties that match the CLI -instance commands?

For example, how would you get vserver.rootvolumesecuritystyle - $v[0].rootvolumesecuritystyle returns blank

Using get-ncVserver | getMember may or may not return a property that works.
There are other ones like get-ncvol.snapshot-policy



Re: Need help with object properties



By default powershell does not populate subattributes. You can get all of the volume info with this command.


$vols = Get-NcVol -Template -Fill

$vols = Get-NcVol


The -fiil attribute forces the complete array to populate. 


If you are only targeting a specific Sub attribute you can get it with this command.


$v = Get-NcVol -Template
Initialize-NcObjectProperty $v VolumeStateAttributes
$v = Get-NcVol 


if you are trying to determine what is in a varible



Hope this helps





Re: Need help with object properties

Also - you might want to post this is the powershell forum.. They made it hard to find, but it's located under microsoft virtualization