Microsoft Virtualization Discussions

Version

JBRUNS2012
5,323 Views


When I use the connect-nacontroller cmdlet, I see this output from the command:

Name                 Address           Ontapi   Version

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

xxxx-xxxx-xxxxx      10.xx.xx.xx       1.13     NetApp Release 8.0.2P3 7-Mode: Thu Oct 13 15:56:25 PDT 2011 Multistore

Is there a get cmdlet that will allow me just to see the version number as in this example, 8.0.2P3

1 ACCEPTED SOLUTION

beam
5,323 Views

You can find this information out using Get-NaCommand with the ListAvailable switch.  This compares the API from the help documentation with the APIs available on the controller to determine if a command can be executed.  For example:

PS> Get-NaCommand -Category cifs -Verb Get, Set -ListAvailable

Name                                Category        Api

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

Get-NaCifs                          cifs            {cifs-list-config}

Get-NaCifsHomeDirectory             cifs            {cifs-homedir-paths-get, cifs-homedir-path-get-for-user}

Get-NaCifsNetBiosAlias              cifs            {cifs-nbalias-names-get}

Get-NaCifsOrganizationalUnit        cifs            {cifs-setup-ou-list-iter-start, cifs-setup-ou-list-iter-next, ci...

Get-NaCifsSession                   cifs            {cifs-session-list-iter-start, cifs-session-list-iter-next, cifs...

Get-NaCifsShare                     cifs            {cifs-share-list-iter-start, cifs-share-list-iter-next, cifs-sha...

Get-NaCifsSite                      cifs            {cifs-setup-site-list-iter-start, cifs-setup-site-list-iter-next...

Get-NaCifsStatistics                cifs            {cifs-top-iter-start, cifs-top-iter-next, cifs-top-iter-end}

Set-NaCifs                          cifs            {cifs-setup}

Set-NaCifsHomeDirectory             cifs            {cifs-homedir-paths-set}

Set-NaCifsNetBiosAlias              cifs            {cifs-nbalias-names-set}

Set-NaCifsShare                     cifs            {cifs-share-change}

Conversely, you can use ListUnavailable to see cmdlets that exist but cannot be run on the current controller:

PS> Get-NaCommand -Category cifs -Verb Get, Set -ListUnavailable

Name                                Category        Api

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

Get-NaCifsBranchCacheHashStatistics cifs            {cifs-branchcache-hash-stat}

Get-NaCifsShareAcl                  cifs            {cifs-share-acl-list-iter-start, cifs-share-acl-list-iter-next, ...

Set-NaCifsBranchCacheKey            cifs            {cifs-branchcache-set-key}

Set-NaCifsShareAcl                  cifs            {cifs-share-ace-set}

-Steven

View solution in original post

6 REPLIES 6

JGPSHNTAP
5,323 Views

$ontapVersion = (get-nasystemversion).split(":")

$ontapversion[0]

JBRUNS2012
5,323 Views

Get-NaSystemversion

The reason I need this is to determine ahead of time, what get/set commands will work and which ones won't.  This leads me to my next question.

Is there a table someplace that documents what get/set cmdlets work and which ones do not when it comes to CIFS relative to the OnTap OS version?

JGPSHNTAP
5,323 Views

You need to read the help file

show-nahelp

JBRUNS2012
5,323 Views

Tried that.

I looked at, for example, help on Cmdlet: Add-NaCifsShare, there is no mention of the minimum requirements for OnTap release to get it to work.

beam
5,324 Views

You can find this information out using Get-NaCommand with the ListAvailable switch.  This compares the API from the help documentation with the APIs available on the controller to determine if a command can be executed.  For example:

PS> Get-NaCommand -Category cifs -Verb Get, Set -ListAvailable

Name                                Category        Api

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

Get-NaCifs                          cifs            {cifs-list-config}

Get-NaCifsHomeDirectory             cifs            {cifs-homedir-paths-get, cifs-homedir-path-get-for-user}

Get-NaCifsNetBiosAlias              cifs            {cifs-nbalias-names-get}

Get-NaCifsOrganizationalUnit        cifs            {cifs-setup-ou-list-iter-start, cifs-setup-ou-list-iter-next, ci...

Get-NaCifsSession                   cifs            {cifs-session-list-iter-start, cifs-session-list-iter-next, cifs...

Get-NaCifsShare                     cifs            {cifs-share-list-iter-start, cifs-share-list-iter-next, cifs-sha...

Get-NaCifsSite                      cifs            {cifs-setup-site-list-iter-start, cifs-setup-site-list-iter-next...

Get-NaCifsStatistics                cifs            {cifs-top-iter-start, cifs-top-iter-next, cifs-top-iter-end}

Set-NaCifs                          cifs            {cifs-setup}

Set-NaCifsHomeDirectory             cifs            {cifs-homedir-paths-set}

Set-NaCifsNetBiosAlias              cifs            {cifs-nbalias-names-set}

Set-NaCifsShare                     cifs            {cifs-share-change}

Conversely, you can use ListUnavailable to see cmdlets that exist but cannot be run on the current controller:

PS> Get-NaCommand -Category cifs -Verb Get, Set -ListUnavailable

Name                                Category        Api

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

Get-NaCifsBranchCacheHashStatistics cifs            {cifs-branchcache-hash-stat}

Get-NaCifsShareAcl                  cifs            {cifs-share-acl-list-iter-start, cifs-share-acl-list-iter-next, ...

Set-NaCifsBranchCacheKey            cifs            {cifs-branchcache-set-key}

Set-NaCifsShareAcl                  cifs            {cifs-share-ace-set}

-Steven

JBRUNS2012
5,323 Views

You guys are awesome.  Thanks

Public