Microsoft Virtualization Discussions

Re: Data ONTAP PowerShell Toolkit 3.2

dgwhitecalgary

I am having an issue with the Add-NcNetFailoverGroupTarget command. It seems to have a mandatory value of -vserver. Is it possible to add to a fialover group that is cluster wide?

 

You can see here that none of my FG's have a vserver specified:

 

4-16-2015 2-02-54 PM.jpg

 

When I go to add a target, it requires a value for vserver:

 

4-16-2015 2-04-41 PM.jpg

 

Using the pipeline results in an error as well:

 

4-16-2015 2-08-09 PM.jpg

 

Any ideas how to get this to work? I can use the cluster shell, but I am looking for a pure pwershell solution. I am using NetApp Release 8.2.3P2 Cluster-Mode.

 

Thx,

 

Dan

 

Re: Data ONTAP PowerShell Toolkit 3.2

AnthonySSL

Anyone know where I can get this version of the Powersehll Toolkit? dot.PNG

Re: Data ONTAP PowerShell Toolkit 3.2

AnthonySSL

I get the same error.  Any solutions?

Re: Data ONTAP PowerShell Toolkit 3.2

Aparajita

Hi Dan,

 

This is a cmdlet introduced for use only on Data ONTAP 8.3 and above.

 

In 8.3, every failover group belongs to a vserver - the cluster wide ones simply belong to the cluster vserver (output from Get-NcNetFailoverGroup below). That is why Add-NcNetFailoverTargets makes vserver a mandatory parameter.

 

I do not have a 8.2.3 system handy right now, but I did verify that addition of failover targets was not supported in 8.2.1. But, if 8.2.3 does support the `network interface failover-groups add-targets` command and does not require the vserver parameter, you can work around this cmdlet by passing the cluster shell command as parameter to the Invoke-NcSystemApi cmdlet.

 

Output from Get-NcNetFailoverGroup on a system running Data ONTAP 8.3

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

 

PS C:\Users\aparajir\Perforce\aparajir_BTC_pstk_1\main> Get-NcNetFailoverGroup

FailoverGroup              Vserver                    Target
-------------                   -------                       ------
Cluster                        Cluster                     {aparajir-vsim1:e0a, aparajir-vsim1:e0b, aparajir-vsim2:e0a, a...
clusterwide                 aparajircluster-1       aparajir-vsim2:e0d
Default                       aparajircluster-1       {aparajir-vsim1:e0c, aparajir-vsim1:e0d, aparajir-vsim2:e0c, a...
test_group                 pstk_peer                 {aparajir-vsim1:e0c, aparajir-vsim2:e0d}

 

Regards,

Aparajita

Re: Data ONTAP PowerShell Toolkit 3.2

Aparajita

Is there any reason you are looking for an older version of the toolkit? We always recommend using the latest version and only the latest version (3.2.1) is available for download.

 

Thanks,

Aparajita

Re: Data ONTAP PowerShell Toolkit 3.2

Aparajita

We strongly recommend using only the latest version of the Data ONTAP PowerShell Toolkit. Only the latest version - 3.2.1 - is available for public download.

 

Is there any reason you are looking for this particular version?

Re: Data ONTAP PowerShell Toolkit 3.2

dgwhitecalgary

Hi Aparajita,

 

It looks like 'network interface failover-groups add-targets' is not supported in 8.2.3 either. I will use the old way 'network interface failover-groups create'.

 

Thx,

 

Dan

Re: Data ONTAP PowerShell Toolkit 3.2

udo_braunschweiger

Hello all

 

i am using the actual version of the power shell toolkit 3.2.1.68

 

i just see that the manual pages are incomplete and sometimes even wrong.

So i can set failover-policy and the other options, i was missing, but its not listed in the full help for the command

 

another command had a complete wrong help content (unfortunately i dont find it anymore), where can these things be reported to?

This would help to make the PSTK an even better and easy to use Tool.

 

Thank for the help!!

 

 

Re: Data ONTAP PowerShell Toolkit 3.2

Aparajita

Hi,

 

We do not have a separate bug reporting thread, but you can either start a new topic or reply to this thread or send a private message to me or rajeshr.

 

Thank you for helping make Data ONTAP PowerShell Toolkit better.

 

- Aparajita

Re: Data ONTAP PowerShell Toolkit 3.2

RaviTeja1988

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

Re: Data ONTAP PowerShell Toolkit 3.2

Aparajita

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

Re: Data ONTAP PowerShell Toolkit 3.2

RaviTeja1988

 

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

Re: Data ONTAP PowerShell Toolkit 3.2

Aparajita

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"'?

Re: Data ONTAP PowerShell Toolkit 3.2

RaviTeja1988

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>

Re: Data ONTAP PowerShell Toolkit 3.2

svarma

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"

 

 

 

 

Re: Data ONTAP PowerShell Toolkit 3.2

Aparajita
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
Earn Rewards for Your Review!
GPI Review Banner
All Community Forums
Public