Microsoft Virtualization Discussions

NetApp PowerShell Toolkit 4.5P1 released!

Dear PowerShell community,


We are glad to announce the release of  NetApp PowerShell Toolkit version 4.5P1 This unified release has enhancements for Data ONTAP module. In this release we have made fixes for following two DataONTAP PowerShell toolkit cmdlets.

1) Invoke-NcSsh   2) Invoke-NaSsh

Prerequisites:- The user needs to install Putty of version "putty-64bit-0.70-installer" on the system from where this cmdlet is being executed.
 

ONTAP PowerShell Module:
The latest release adds upto 2170 cmdlets and provides maximum API coverage for ONTAP 9.3 and is backward compatible with previous ONTAP releases.

SANtricity PowerShell Toolkit
The SANtricity PowerShell module supports more than 300 cmdlets, enabling the storage administration of NetApp E-Series storage systems and EF-Series all-flash arrays.

 

Download the PowerShell Toolkit 4.5P1 from here


Regards,
NetApp PowerShell Toolkit Team

21 REPLIES

Re: NetApp PowerShell Toolkit 4.5P1 released!

Just doing some first tests with the new Invoke-NaSsh in PSTK 4.5P1

 

First impressions

 

- It need external PuTTY installed

- It seems to find/access PuTTY through windows registry, which fails when my PS session has no elevated priviledge. I get this error when trying it as a normal user:

 

PS C:\Users\mark> Invoke-NaSsh -Name ucnlabfiler07 -Command date -Credential $(Get-Credential root)
Invoke-NaSsh : Der angeforderte Registrierungszugriff ist unzulässig.
In Zeile:1 Zeichen:1
+ Invoke-NaSsh -Name ucnlabfiler07 -Command date -Credential $(Get-Cred ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Smiley Happy [Invoke-NaSsh], SecurityException
    + FullyQualifiedErrorId : System.Security.SecurityException,DataONTAP.PowerShell.SDK.Cmdlets.Toolkit.Ssh.InvokeNaSsh

 

(this is on a German Windows 10 box, and means something like  ´no permission to access the registry´ .)

 

- the cmdlet works when Powershell is started "As Administrator"

- it also actually works with ONTAP 9.3 and 8.2.5 7mode now (that's what I've been missing)

- However it's SLOW. Running a single ssh command against a cDOT Cluster takes 8 (!) seconds for me:

 

PS C:\WINDOWS\system32> Measure-Command -Expression {Invoke-NaSsh -Name 10.230.41.76 -Command date -Credential $cred}


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 8
Milliseconds      : 46
Ticks             : 80460210
TotalDays         : 9,31252430555556E-05
TotalHours        : 0,00223500583333333
TotalMinutes      : 0,13410035
TotalSeconds      : 8,046021
TotalMilliseconds : 8046,021

 

So at first glance, thanks for the fix, but I think for now I'll stick with the Invoke-NcSystemApi workaround, which is MUCH faster and has no external dependencies.

 

Regards,

Mark

Re: NetApp PowerShell Toolkit 4.5P1 released!

Hello, did you find any solution to this? Have very same problem and it is quite annoying.

Have to execute powershell as Administrator, than it works, otherwise it gives this error:

 

>> Invoke-NcSsh system health status show
Invoke-NcSsh : Requested registry access is not allowed.
At line:1 char:1
+ Invoke-NcSsh system health status show
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Smiley Happy [Invoke-NcSsh], SecurityException
    + FullyQualifiedErrorId : System.Security.SecurityException,DataONTAP.C.PowerShell.SDK.Cmdlets.Toolkit.Ssh.InvokeNcSsh

 

Any help appreciated.

Re: NetApp PowerShell Toolkit 4.5P1 released!

Same issues, access error - requires "Run As Administrator" (Server 2008\2012) 

Re: NetApp PowerShell Toolkit 4.5P1 released!

\HKEY_LOCAL_MACHINE\SOFTWARE\SimonTatham (Right click, permissions)

 

All application packages: Full Control
Users (of the local machine your on): Full Control

 

Tested on Server 2012 and Server 2016: works.

Re: NetApp PowerShell Toolkit 4.5P1 released!

The module version (command module) is still 4.3.0 while the installed msi is 4.5P1.

Re: NetApp PowerShell Toolkit 4.5P1 released!

I get the "Invoke-NcSsh : Requested registry access is not allowed." error on systems running higher than ONTAP 9.1

 

I've gotten around it using the 'Run as Administrator' and/or the Registry changes noted in the flag... However, the performance is significantly slower than before... you can see "plink" spawning before you finally get your results back.

 

 

Is this the expected behavior going forward?

 

Thanks,

--Craig

Highlighted

Re: NetApp PowerShell Toolkit 4.5P1 released!

can you tell me what is the reason for this  ?  what has to do with Putty ?

 

PS C:\Windows\system32> Get-Module

 

ModuleType Version Name ExportedCommands

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

Script 1.0.0.0 ISE {Get-IseSnippet, Import-IseSnippet, New-IseSnippet}

Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}

Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}

 

 

PS C:\Windows\system32> import-module dataontap

 

PS C:\Windows\system32> Connect-NcController 192.168.163.135

Name Address Vserver Version

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

192.168.163.135 192.168.163.135 NetApp Release 9.3RC1: Wed Nov 01 07:34:37 UTC 2017

 

 

PS C:\Windows\system32> Invoke-NcSsh version

Invoke-NcSsh : Please install putty (version putty-64bit-0.70) on your machine to use this cmdlet.

At line:1 char:1

+ Invoke-NcSsh version

+ ~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotInstalled: (192.168.163.135:NcController) [Invoke-NcSsh], ArgumentException

+ FullyQualifiedErrorId : Please install putty (version putty-64bit-0.70) on your machine to use this cmdlet.,DataONTAP.C.PowerShell.SDK.Cmdlets.Toolkit.Ssh.InvokeNcSsh

 

PS C:\Windows\system32>

 

Re: NetApp PowerShell Toolkit 4.5P1 released!

It worked after installing putty 64 bit, 

 

But,  while executing that version command for one host,  the black-screen cmd command promt window opened and - may be it ran from there and closed and I got output, 

 

Now, what if , if I have 50 controllers - clusters,  which I run in for each host loop,  does it needs to open that black cmd window 50 times or it will remain open till all those 50s are executed  ?

 

 

PS C:\Windows\system32> Get-Module

 

ModuleType Version Name ExportedCommands

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

Script 1.0.0.0 ISE {Get-IseSnippet, Import-IseSnippet, New-IseSnippet}

Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}

Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}

 

 

PS C:\Windows\system32> import-module dataontap

PS C:\Windows\system32> Connect-NcController 192.168.163.135

Name Address Vserver Version

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

192.168.163.135 192.168.163.135 NetApp Release 9.3RC1: Wed Nov 01 07:34:37 UTC 2017

 

 

PS C:\Windows\system32> Invoke-NcSsh version

NetApp Release 9.3RC1: Wed Nov 01 07:34:37 UTC 2017

 

PS C:\Windows\system32>

 

Re: NetApp PowerShell Toolkit 4.5P1 released!

Hello @himal123,

 

The window that opens is Plink running to connect to the ONTAP system and execute the command.  It will disappear when the command is finished.  Unless you're executing multiple Invoke-NcSsh commands in parallel, then there will only be one at a time.

 

One thing to note, the new Invoke-NcSsh is much slower than previously.  You can regain much of that speed by manually executing Plink in your PowerShell script (this also doesn't require the PowerShell script to be elevated), however doing so means that you need to have the credentials in clear text which is not ideal for many.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Forums