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.
Hi All, Since update from 9.1.15.2407 to 2410 there is a failure of the first cmdlet following 'connect-controller', example : #Import-Module -force DataONTAP
$Credential = Import-Clixml $CredentialXmlNetappPath -ErrorAction SilentlyContinue
$ncController = Connect-NcController $ClusterName -Credential ($Credential) -Timeout 600000
PS C:\Windows\system32> Get-NcAggr
Get-NcAggr : Le serveur distant a retourné une erreur : (400) Demande incorrecte.
Au caractère Ligne:1 : 1
+ Get-NcAggr
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NcAggr], WebException
+ FullyQualifiedErrorId : System.Net.WebException,DataONTAP.C.PowerShell.SDK.Cmdlets.Aggr.GetNcAggr
PS C:\Windows\system32> Get-NcAggr
Name State TotalSize Used Available Disks RaidType RaidSize Volumes
---- ----- --------- ---- --------- ----- -------- -------- -------
fp_004TB_dpa1nc01_1 online 153,9 TB 110,0 TB 51 17 thanks in advance powershell 5.1 Windows 2019 Ontap 9.14.1P8 regards, Yannick
... View more
We are moving a Workday environment and it's dependent upon using the PSTK commandlets for all user provisioning, onboarding and offboarding. PS v. 5.1, PSTK 9.13.1. We cannot install any version without hitting the same error. It appears all the PSTK downloads are shipping with expired certs. The certs expired 2 days ago on 10/13: PS C:\Windows\system32> install-module Netapp.Ontap -force -scope AllUsers PackageManagement\Install-Package : The module 'NetApp.ONTAP' cannot be installed or updated because the authenticode signature of the file 'NetApp.ONTAP.psd1' is not valid. At C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception + FullyQualifiedErrorId : InvalidAuthenticodeSignature,ValidateAndGet-AuthenticodeSignature,Microsoft.PowerShell.P ackageManagement.Cmdlets.InstallPackage Failed to install or import required PSModules The following error occurred while loading the extended type data file: , C:\Program Files (x86)\WindowsPowerShell\Modules\NetApp.ONTAP\9.13.1.2306\DataONTAP.Type.ps1xml: The file was skipped because of the following validation exception: File C:\Program Files (x86)\WindowsPowerShell\Modules\NetApp.ONTAP\9.13.1.2306\DataONTAP.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.. , C:\Program Files (x86)\WindowsPowerShell\Modules\NetApp.ONTAP\9.13.1.2306\DataONTAP.C.Type.ps1xml: The file was skipped because of the following validation exception: File C:\Program Files (x86)\WindowsPowerShell\Modules\NetApp.ONTAP\9.13.1.2306\DataONTAP.C.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..
... View more
I am trying to run a PowerShell script to connect to multiple filers and do a 'get-ncvol'. I have a scheduled task running from the Windows Task Scheduler that is running with a Group Managed Service Account. My script contains the username that I'm logging into the filer(s) with along with the password which is encrypted in a file (the encryption was done while running with the Group Managed Service Account). I used the following to encrypt the password: "password" | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString | Set-Content "C:\myfiles\stuff\encryptedpassword.txt" Then in my script, once again running as my Group Managed Service Account, I do the following: $username = 'domain\id' $password = Get-Content "C:\myfiles\stuff\encryptedpassword.txt" | ConvertTo-SecureString $hosts = Get-Content "C:\myfiles\stuff\filers.txt" $cred = $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password $hosts | % { $filer = $_ Add-NcCredential -controller $filer -credential $cred } foreach($cluster in $hosts) { Connect-NcController -name $cluster | Out-Null Get-NcVol | Export-CSV $filename -Append -NoTypeInformation } When it tries to connect to the filer I get a " Connect-NcController : Incorrect credentials for myfiler1 I can't figure out why the credential is incorrect.
... View more
All I have downloaded and installed the latest PowerShell Toolkit 9.7.1. I am running PowerShell 7.0.3 and when I try to run the command Import-Module DataONTAP I get this (verbose mode):
import-module DataONTAP -verbose
VERBOSE: Loading module from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.psd1'. VERBOSE: Loading 'Assembly' from path 'C:\program files\powershell\7\Modules\DataONTAP\OntapiPS.dll'. VERBOSE: Loading 'Executable' from path 'C:\program files\powershell\7\Modules\DataONTAP\OntapiPS.dll'. VERBOSE: Loading 'Assembly' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.HostUtilities.dll'. VERBOSE: Loading 'Executable' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.HostUtilities.dll'. VERBOSE: Loading 'TypesToProcess' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.Type.ps1xml'. VERBOSE: Loading 'TypesToProcess' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.C.Type.ps1xml'. VERBOSE: Loading 'FormatsToProcess' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.Format.ps1xml'. VERBOSE: Loading 'FormatsToProcess' from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.C.Format.ps1xml'. VERBOSE: Loading module from path 'C:\program files\powershell\7\Modules\DataONTAP\DataONTAP.dll'. Import-Module: Could not load type 'System.Management.Automation.PSSnapIn' from assembly 'System.Management.Automation, Version=7.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
That last error is on DataONTAP.dll I asume. Has any one run across this?
... View more
Deal All, I have installed ONTAP PowerShell Toolkit 9.15.1 to automate health check report. Executing below command does not show used space both for aggregates and volumes get-ncaggr get-ncvol I m using ONTAP version 9.12.x but the ONTAP PowerShell Toolkit is at 9.15.1. m i missing anything ? Appreciate you guidance.
... View more