Discuss NetApp solutions for Microsoft Private Cloud and the Hyper-V platform, including FlexPod Datacenter, OnCommand Plug-in for Microsoft, and ONTAP PowerShell Toolkit.
Discuss NetApp solutions for Microsoft Private Cloud and the Hyper-V platform, including FlexPod Datacenter, OnCommand Plug-in for Microsoft, and ONTAP PowerShell Toolkit.
Hello, some time ago I created script that shows me directories on each volume. After module update to 9.11.1.2208 the script fails on read-ncdirectory command with error message: Read-NcDirectory : Invalid path. Path should be in format /vol/<volume name>/<directory name> part of code: foreach ($volume in (Get-NcVol -Aggregate ************)) { $vserver = $volume.Vserver $volname = $volume.Name $level1 = Read-NcDirectory -VserverContext $vserver -Path /vol/$volname|?{($_.Name -notlike ".*") -and ($_.Type -like "directory")-and ($_.Name -notlike "Trash")} } how can i modify the script to work again?
... View more
Hello all, Need some help. I want to run the following: volume snapshot show -fields create-time, size, state, is-constituent Using the Ontap Powershell and redirect it to a local Excel format. I can get connected to my Clusters using the Connect-NcController, just cannot get the syntax correct for the volume command. Any help would be great.
... View more
Dear PowerShell community, We are glad to announce the release of the NetApp® ONTAP® 9.11.1.2208 PowerShell Toolkit. What’s New Toolkit introduces REST API functionality for cmdlets to support ONTAP features available through 9.11.1 through both REST and ZAPI. Toolkit has not made any changes to existing support for ZAPI calls. PSTK cmdlets use REST API by default from ONTAP 9.10.1 release onwards Toolkit has not made any changes to existing support for ZAPI calls. To execute cmdlets by using ZAPI calls, use the -ONTAPI parameter like below: Connect-NcController ControllerIP Get-NcVserver -Name vs0 -ONTAPI Set a global connection to execute all cmdlets using ZAPI calls use the -ONTAPI parameter at connection level like below: Connect-NcController ControllerIP -ONTAPI Get-NcVserver -Name vs0 PowerShell Toolkit Upgrade and Backward Compatibility The toolkit name has been changed from DataONTAP to NetApp.ONTAP. To provide backward compatibility i.e. existing scripts compatibility and to allow users to import the module using the previous name, complete the following steps: PowerShell Gallery Use cmdlet uninstall-module DataONTAP if an older package is available. Use cmdlet install-module NetApp.ONTAP to install the ONTAP 9.11.1.2208 package. Execute the following two commands. Before executing these commands, ensure that “C:\Program Files\WindowsPowerShell\Modules\NetApp.ONTAP” exists. This is the default location where the PowerShell gallery install module resides. If this location has been updated, update the path accordingly. New-Item -ItemType SymbolicLink -Path ("C:\Program Files\WindowsPowerShell\Modules\DataONTAP") -Target ("C:\Program Files\WindowsPowerShell\Modules\NetApp.ONTAP") New-Item -ItemType SymbolicLink -Path ("C:\Program Files\WindowsPowerShell\Modules\DataONTAP\9.11.1.2208\DataONTAP.psd1") -Target ("C:\Program Files\WindowsPowerShell\Modules\DataONTAP\9.11.1.2208\NetApp.ONTAP.psd1") Once the commands have completed, import the module using both names “DataONTAP” and “NetApp.ONTAP”. NetApp ToolChest Download the package from the ToolChest. Extract the package. Execute Install.ps1 and enter the location where you want to update the existing package or do a fresh installation. Once the command has completed, import the module using both names “DataONTAP” and “NetApp.ONTAP”. For more details refer to PowerShell Toolkit Installation Guide Toolkit can be downloaded from PowerShell Gallery as well. Regards, NetApp PowerShell Toolkit Team
... View more
Hello, I am trying to upgrade the NetApp PowerShell Toolkit from version 9.7.1 to 9.9.1, and I am finding it to be mind-numbingly confusing. First, I extracted the zip file to the download folder and tried running install.ps1 as described in the Installation Guide on page 7. I got the following error: ----------------------------------------------------------------------------------------------- Suggestion [3,General]: The command install.ps1 was not found, but does exist in the current location. PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\install.ps1". See "get-help about_Command_Precedence" for more details. ----------------------------------------------------------------------------------------------- I tried the recommended syntax of .\install.ps1 and got this: ----------------------------------------------------------------------------------------------- .\install.ps1: File C:\Users\!tthomas1\Downloads\NetApp.ONTAP\Install.ps1 cannot be loaded. A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.. ----------------------------------------------------------------------------------------------- Since that wasn't working, I manually exported the zip file to the appropriate Program Files location and ran this command: Import-Module "C:\Program Files\WindowsPowerShell\Modules\netapp_ontap\NetApp.ONTAP\NetApp.ONTAP.psd1" It results in the following error. Note I am running as admin. ----------------------------------------------------------------------------------------------- Import-Module: The following error occurred while loading the extended type data file:, C:\Program Files\WindowsPowerShell\Modules\netapp_ontap\NetApp.ONTAP\DataONTAP.Type.ps1xml: The file was skipped because of the following validation exception: File C:\Program Files\WindowsPowerShell\Modules\netapp_ontap\NetApp.ONTAP\Data ONTAP.Type.ps1xml cannot be loaded. A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file... ----------------------------------------------------------------------------------------------- I then abandoned the installation guide and went to the following post: https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/NetApp-PowerShell-Toolkit-9-9-1-2106-released/m-p/167519 I tried the Install-Module command and got the following. After entering "Y", nothing happened. ----------------------------------------------------------------------------------------------- PS C:\Users\!tthomas1\Downloads\NetApp.ONTAP> install-module NetApp.ONTAP Untrusted repository You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y ----------------------------------------------------------------------------------------------- The last release I installed was an extremely simple executable. This is frustrating to say the least. Can someone assist?
... View more