Application Integration
1752796 Members
5706 Online
108789 Solutions
New Discussion юеВ

Nimble PowerShell Toolkit now posted to the Microsoft PSGallery

 
Chris_Lionetti
HPE Pro

Nimble PowerShell Toolkit now posted to the Microsoft PSGallery

If you have experience with running PowerShell in the wild, you know the work that is involved with first finding the vendors specific PowerShell Toolkit, then downloading it, and placing it in the correct directory, then checking back with the vendor every so often to see if an update exists. When an update comes out, you need to go back to your server and repeat all of the steps all over again.

There has got to be a better way; well there is, and its built into PowerShell called the Microsoft Powershell Gallery (PSGallery). Let me walk you through the new installation process for the toolkit.

Step 1; Launch PowerShell (in Administrator Mode) and tell PowerShell that is should trust the Microsoft PSGallery, since shipping windows doesnt by default.

PS:> Set-PSRepository -Name PSGallery -InstallationPolicy trusted

Step 2; Find the Nimble PowerShell Toolkit. Note that you can discover all of the HPE PowerShell Toolkits this way, and not just the Nimble PowerShell Toolkit. These other toolkits also might be helpful to you.

PS:> Find-Module -name HPE*

PSGallery of HPE*PSGallery of HPE*

Step 3; Lets narrow that list down to JUST the HPE Nimble Storage PowerShell Toolkit, and pipe that to the Install-Module command

Note: You will also need to add the argument to accept the license. To review the license, open a web browser to the www.psgallery.com website and search for the HPE Nimble PowerShell Toolkit.

PS:> Find-Module -name HPENim* | Install-Module -AcceptLicense

Once the PowerShell Toolkit has been installed, you can immediately go on to use the toolkit by loading the module, and connecting to your Nimble Storage Array of choice.

PS:> Import-Module -name HPENimblePowerShellToolkit

PS:>Connect-NSGroup -group 192.168.1.50 -cred admin -ignoreServerCertificate

Optional Step 4; At a future date, to ensure that you have the most common version of the PowerShell Toolkit, you can issue the following command which will automatically update the module.

PS:> Update-Module -name HPENimblePowerShellToolkit

Happy Coding.

-Chris Lionetti

 

 

Chris Lionetti
3 REPLIES 3
ipro-bgardner5
Occasional Advisor

Re: Nimble PowerShell Toolkit now posted to the Microsoft PSGallery

Please also provide a regular Programs and features-compatible package. When I need this -now- I don't have time to figure out why the powershell install commands aren't working, how to enable tlsv1.2, update the PowerShellGet package, register the PSGallery repository, etc.
Chris_Lionetti
HPE Pro

Re: Nimble PowerShell Toolkit now posted to the Microsoft PSGallery

You are absolutely right. I personally dont like the process we have to follow to download the PowerShell Toolkit, in fact I dont use that process on my own lab machines. You can still manually download and install the Nimble PowerShell Toolkit from the Infosight software downloads page, we still publish it there, but I think I have a solution you may like more.

For my lab machines, I pull the latest copy from a GitHub project I wrote, and install directly, without even having to open a browser. I have made this software so it will not overwrite an existing install, but the code is very easy to modify. Sorry about the small font, but I wanted to keep the lines together to keep it readable. Just throw this snipped into a PS1 file and run it from a Administrator PowerShell window.

$WinPSModulePath = 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules' 
$PSMPath  = $WinPSModulePath+'\HPENimblePowerShellToolkit' 
$TempPath = [system.IO.Path]::GetTempPath()
if ( Test-Path $PSMPath -pathtype Container )
    {   write-info 'The Nimble PowerShell Toolkit was already detected. aborting installation.' 
    } else 
    {   invoke-webrequest -uri $NimblePSTKuri -outfile ( $TempPath + "HPENimblePowerShellToolkit.zip" ) 
        expand-archive -path ( $TempPath + "HPENimblePowerShellToolkit.zip" ) -DestinationPath $WinPSModulePath 
    } 
I hope this snippet helps solve your immediate needs, let me know other pain points, I would love to help you come to useful solutions by delivering better tooling.
Chris Lionetti
ipro-bgardner5
Occasional Advisor

Re: Nimble PowerShell Toolkit now posted to the Microsoft PSGallery

Thanks for this. It has been useful.

It would also be nice if this module was included in the Nimble Windows Toolkit.

Regards,