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.

Active IQ Unified Manager Discussions

using -template switch with get-nc commands

stephen2
4,014 Views

Has anyone used the -template switch with the nc-get commands?

I am trying to use get-ncvserver -template to retrieve only cluster and data vservers, not node vservers. I tried using the exact syntax from the posh documentation as follows:

  $v = Get-NcVserver -Template

  $v.State = "running"

  $v.VserverType = "cluster"

  Get-NcVserver -Query $v

  Get-WFALogger -Info -message $("Vservers : "+$v)

However, the only thing returned is:

Vservers : DataONTAP.C.Types.Vserver.VserverInfo

I suspect this might be a usage problem.

1 ACCEPTED SOLUTION

stephen2
4,014 Views

Found the answer - you don't need to use -template.

Just test the result  $vserver.vservertype  - it will return admin, data, node

View solution in original post

1 REPLY 1

stephen2
4,015 Views

Found the answer - you don't need to use -template.

Just test the result  $vserver.vservertype  - it will return admin, data, node

Public