Microsoft Virtualization Discussions

Data ONTAP PowerShell Toolkit 3.2

rajeshr
50,622 Views

Hi PowerShell community,

Glad to announce availability of Data ONTAP PowerShell Toolkit Version 3.2.

The Data ONTAP PowerShell Toolkit can be downloaded from the NetApp support site: http://support.netapp.com/NOW/download/tools/powershell_toolkit/

Thanks

Rajesh.R

 

Version 3.2 release notes:

Major features

  • Data ONTAP 8.3 API support

Toolkit 3.2 includes API coverage for Data ONTAP 8.3.  This includes 126 new cmdlets and 31 cmdlets with new parameters. There are several categories introduced in Data ONTAP 8.3 and Toolkit 3.2 introduces two of them, namely MetroCluster and Storage Pool.

 

The following clustered Data ONTAP categories contain new cmdlets:

  • aggr (16 cmdlets)
  • cifs (13 cmdlets)
  • metrocluster (new category - 26 cmdlets)
  • net (48 cmdlets)
    • ipspace (4 cmdlets)
    • firewall (10 cmdlets)
    • failover group (4 cmdlets)
    • subnet (5 cmdlets)
    • port broadcast domain (7 cmdlets)
    • route (4 cmdlets)
    • arp (5 cmdlets)
    • ndp (9 cmdlets)
  • storage pool (new category - 8 cmdlets)
  • snapmirror (1 cmdlets)
  • vserver (7 cmdlets)

Enhancements

  • Get-NaDiskwill use storage-disk-get-iter when available.
  • ConvertTo-NaVhdx will create a fully-allocated dynamic VHDX instead of a fixed-size VHDX.
  • Invoke-NcSysstat now works with Data ONTAP 8.3
  • Fibre channel port information has been added to the output of Get-NaHostFcAdapter.

Fixes

  • ConvertTo-NaVmdk could fail when connecting to a vserver management LIF that is also a CIFS data LIF and a network name was used.
  • ConvertTo-NaVmdk could fail when connecting to a vserver by name when DNS round robin is used.
  • Set-NcTime would fail for Data ONTAP 8.2 and higher.
  • Reset-NcCifsPassword did not have a default parameter set.
  • Get-NaVol could fail in the vfiler context.

Docs

Check out "Making the Most of Data ONTAP PowerShell Toolkit" for more details on the new features.  If you're new to PowerShell or the Toolkit, you might want to start with our "Getting Started" slides

 

33 REPLIES 33

LEON_IC_UVA
45,106 Views

Hi,

 

Is connect-NcController -RPC an option yet?

 

Thnx,

Leon

vinith
45,080 Views

Hello Leon,

 

connect-NcController -RPC  options is not supported as RPC based connectivity option is not supported in C-mode, its supported only in 7-mode.

 

LEON_IC_UVA
45,077 Views

Hi Vinith,

 

Ok. Why is RPC dropped in cDOT? 

 

 

TNAE
44,968 Views

Quick question. Are the new cmdlets also working for Ontap 8.2? fe get-ncaggrspace

Aparajita
44,941 Views

Hi TNAE,

The new cmdlets introduced in Data ONTAP PowerShell Toolkit 3.2 work only on Data ONTAP 8.3. They will not work with older versions of Data ONTAP.

In the particular case of Get-NcAggrSpace, you can get the same information on DataONTAP 8.2 by using the AggrSpaceAttributes property of Get-NcAggr cmdlet. You can define a function like

Function Get-NcAggrSpace-SN($inp) {
     $res = Get-NcAggr $inp
    foreach ($a in $res) {
            Write-Output Name: $a.Name
            Write-Output $a.AggrSpaceAttributes
    }
}

and now use "Get-NcAggrSpace-SN" as a command to get the same information for older Data ONTAP versions as "Get-NcAggrSpace" gives on DataONTAP 8.3

tomers
44,818 Views

Hi, 

where can i get the release notes for the 3.2 Tollkit ?

i want to see what is new.

 

Thanks,

Tomer.

rajeshr
44,805 Views

Import the DataONTAP module and type "Show-NcHelp". This takes few minutes and opens up a html page in the default browser. A "Release Notes" link must be available in there.

tomers
44,184 Views

Hi, 

Thank you for the replay.

Cant i read it without installing ?

 

Tomer.

rajeshr
44,182 Views

Of course, you can read it from here as well - "Check out "Making the Most of Data ONTAP PowerShell Toolkit" for more details on the new features".

tomers
18,695 Views

Great Thanks.

RaviTeja1988
14,702 Views

Not working.

 

PS I:\Scripting> show-nahelp
show-nahelp : The term 'show-nahelp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:1
+ show-nahelp
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (show-nahelp:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

 

 

 

PS I:\Scripting> Get-Command -Module DataONTAP

CommandType Name ModuleName
----------- ---- ----------
Alias Add-NcHostIscsiConnection DataONTAP
Alias Connect-NcHostIscsiTarget DataONTAP
Alias ConvertTo-NcLun DataONTAP
Alias ConvertTo-NcVhd DataONTAP
Alias ConvertTo-NcVhdx DataONTAP
Alias ConvertTo-NcVmdk DataONTAP
Alias Copy-NcHostFile DataONTAP
Alias Disconnect-NcHostIscsiTarget DataONTAP
Alias Dismount-NcHostVolume DataONTAP
Alias Dismount-NcVirtualDisk DataONTAP
Alias Format-NcHostVolume DataONTAP
Alias Get-NcHostDisk DataONTAP
Alias Get-NcHostFcAdapter DataONTAP
Alias Get-NcHostIscsiAdapter DataONTAP
Alias Get-NcHostIscsiSession DataONTAP
Alias Get-NcHostIscsiTarget DataONTAP
Alias Get-NcHostVolume DataONTAP
Alias Get-NcHyperV DataONTAP
Alias Get-NcVirtualDiskAlignment DataONTAP
Alias Get-NcVssProvider DataONTAP
Alias Get-NcVssSnapshot DataONTAP
Alias Get-NcVssWriter DataONTAP
Alias Initialize-NcHostDisk DataONTAP
Alias Invoke-NcHostVolumeSpaceReclaim DataONTAP
Alias Invoke-NcVirtualDiskSpaceReclaim DataONTAP
Alias Invoke-NcVssBackup DataONTAP
Alias Mount-NcHostVolume DataONTAP
Alias Mount-NcVirtualDisk DataONTAP
Alias New-NcHostVolume DataONTAP
Alias New-NcVirtualDisk DataONTAP
Alias Remove-NcHostFile DataONTAP
Alias Remove-NcHostIscsiConnection DataONTAP
Alias Remove-NcHostVolume DataONTAP
Alias Repair-NcVirtualDiskAlignment DataONTAP
Alias Restore-NcHostFile DataONTAP
Alias Set-NcHostDisk DataONTAP
Alias Set-NcHostVolumeSize DataONTAP
Alias Set-NcVirtualDiskSize DataONTAP
Alias Start-NcHostDiskRescan DataONTAP
Alias Wait-NcHostDisk DataONTAP
Function Add-NaHelpInfoUri DataONTAP

Aparajita
14,700 Views

Hi Ravi,

 

This (output of Get-Command) looks like some of the sub-modules could not be successfully loaded. Can you share what command you used to load the DataONTAP module and your PowerShell version?

 

Thanks,

Aparajita

RaviTeja1988
14,698 Views

 

It's not loading all commands. i tryed to uninstall and install so many times , but no use. even help also not working.

 

Powershell Version:-

PS I:\Scripting> $PSVersionTable.PSVersion

Major Minor Build Revision
----- ----- ----- --------
4 0 -1 -1

 

Modules are not loading:-

PS I:\Scripting> Import-Module -Name DataONTAP
PS I:\Scripting> show-nahelp
show-nahelp : The term 'show-nahelp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:1
+ show-nahelp
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (show-nahelp:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

PS I:\Scripting> Get-Command -Module DataONTAP

CommandType Name ModuleName
----------- ---- ----------
Alias Add-NcHostIscsiConnection DataONTAP
Alias Connect-NcHostIscsiTarget DataONTAP
Alias ConvertTo-NcLun DataONTAP
Alias ConvertTo-NcVhd DataONTAP
Alias ConvertTo-NcVhdx DataONTAP
Alias ConvertTo-NcVmdk DataONTAP
Alias Copy-NcHostFile DataONTAP
Alias Disconnect-NcHostIscsiTarget DataONTAP
Alias Dismount-NcHostVolume DataONTAP
Alias Dismount-NcVirtualDisk DataONTAP
Alias Format-NcHostVolume DataONTAP
Alias Get-NcHostDisk DataONTAP
Alias Get-NcHostFcAdapter DataONTAP
Alias Get-NcHostIscsiAdapter DataONTAP
Alias Get-NcHostIscsiSession DataONTAP
Alias Get-NcHostIscsiTarget DataONTAP
Alias Get-NcHostVolume DataONTAP
Alias Get-NcHyperV DataONTAP
Alias Get-NcVirtualDiskAlignment DataONTAP
Alias Get-NcVssProvider DataONTAP
Alias Get-NcVssSnapshot DataONTAP
Alias Get-NcVssWriter DataONTAP
Alias Initialize-NcHostDisk DataONTAP
Alias Invoke-NcHostVolumeSpaceReclaim DataONTAP
Alias Invoke-NcVirtualDiskSpaceReclaim DataONTAP
Alias Invoke-NcVssBackup DataONTAP
Alias Mount-NcHostVolume DataONTAP
Alias Mount-NcVirtualDisk DataONTAP
Alias New-NcHostVolume DataONTAP
Alias New-NcVirtualDisk DataONTAP
Alias Remove-NcHostFile DataONTAP
Alias Remove-NcHostIscsiConnection DataONTAP
Alias Remove-NcHostVolume DataONTAP
Alias Repair-NcVirtualDiskAlignment DataONTAP
Alias Restore-NcHostFile DataONTAP
Alias Set-NcHostDisk DataONTAP
Alias Set-NcHostVolumeSize DataONTAP
Alias Set-NcVirtualDiskSize DataONTAP
Alias Start-NcHostDiskRescan DataONTAP
Alias Wait-NcHostDisk DataONTAP
Function Add-NaHelpInfoUri DataONTAP

Aparajita
14,074 Views

Have you tried loading the module using it's full path?

 

Something like 'Import-Module "C:\Program Files(x86)\NetApp\Data ONTAP\DataONTAP" or 'Import-Module "C:\Program Files(x86)\NetApp\Data ONTAP\DataONTAP.psm1"'?

RaviTeja1988
14,072 Views

i tryed it, no use. Even help also not working.

 

 

PS I:\Scripting> Import-Module "C:\Program Files (x86)\NetApp\Data ONTAP PowerShell Toolkit\DataONTAP\DataONTAP.psd1"
PS I:\Scripting>

svarma
13,852 Views

Possible bug with command: Add-NcFileDirectorySecurityPolicyTask
-------------

I am trying to automate adding CIFS SACLs (for auditing).

 

The command:

PS C:\Powershell> Add-NcFileDirectorySecurityPolicyTask -Name SecPolicyTask_ResetEveryoneFullControl -VserverContext <some Vserver> -Path "<some path>" -SecurityType "ntfs" -NtfsMode "propagate" -NtfsSecurityDescriptor ntfssd

 

Always throws up this error:
----------------------------
Add-NcFileDirectorySecurityPolicyTask : Invalid value specified for "ntfs-sd" element within "file-directory-security-policy-task-add": " ".
At line:1 char:38
+ Add-NcFileDirectorySecurityPolicyTask <<<< -Name SecPolicyTask_ResetEveryoneFullControl -VserverContext <some Vserver> -Path "<some path>" -SecurityType "ntfs" -NtfsMode "propaga
te" -NtfsSecurityDescriptor ntfssd
+ CategoryInfo : InvalidOperation: (10.68.125.55:NcController) [Add-NcFileDirectorySecurityPolicyTask], EINVALIDINPUTERROR
+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.FileDirectorySecurity.AddNcFileDirectorySecurityPolicyTask
--------------------

The equivalent ssh command runs without error:

 

vserver security file-directory policy task add -vserver <some Vserver> -policy-name SecPolicyTask_ResetEveryoneFullControl -path "<some path>" -security-type ntfs -ntfs-mode propagate -ntfs-sd ntfssd -index-num 1

 

Also, is there a way to get the PowerShell equivalent of:

"set -privilege advanced"
"vserver security file-directory policy apply"

 

 

 

 

Aparajita
13,705 Views
This is indeed a bug in 3.2 ... Please upgrade to the latest (3.2.1) version from http://mysupport.netapp.com/NOW/download/tools/powershell_toolkit/; the issue has been fixed. Regarding accessing priviledged commands, there is no equivalent of "set -privilege advanced". Some advanced commands are available as cmdlets - they require no special permissions/setting for execution. For those which do not have equivalent cmdlets, check out the Invoke-NcSsh command. That might serve as a viable workaround. Hope this helps, Aparajita

svarma
12,174 Views

Thanks, Aparajita. Really appreciate your looking into this issue. 

 

 

Avanish
19,174 Views

Unable to access provide location.

 

Error message as follows:

 

Unauthorized Access

You have come to a page or module to which you do not have permission.

If you believe you have proper permissions and have reached this notification in error, please submit Feedback.

If you have an urgent technical issue related to a NetApp product, please contact NetApp's Global Support Center

AnthonySSL
16,675 Views

I get the same error.  Any solutions?

Public