HP 3PAR PowerShell Toolkit

JohnMH
Posts: 505
Joined: Wed Nov 19, 2014 5:14 am

HP 3PAR PowerShell Toolkit

Post by JohnMH »

Overview

We are pleased to announce the support of HP 3PAR StoreServ Storage with Microsoft Windows PowerShell. HP 3PAR StoreServ Storage PowerShell Toolkit, that enables support of HP 3PAR StoreServ Storage with Microsoft Windows PowerShell, is a collection of Microsoft Windows PowerShell scripts that are wrappers around the native 3PAR StoreServ CLI commands. HP 3PAR StoreServ Storage PowerShell scripts in the HP 3PAR StoreServ Storage PowerShell toolkit provides storage administrators the convenience of managing HP 3PAR StoreServ Storage Systems from a Microsoft Windows PowerShell environment. HP 3PAR StoreServ Storage PowerShell toolkit can be run from supported Windows platform that has Microsoft Windows PowerShell v2.0 or later installed.

Description

The HP 3PAR PowerShell Toolkit v1.0 contains 36 PowerShell scripts, which cover the most common storage management operations like CPG management, Host & Host Set management, Virtual Volume and Virtual Volume Set management, Snapshot management, etc. These operations can be performed on the HP 3PAR StoreServ Storage Systems with HP 3PAR Operating System 3.1.1, 3.1.2, 3.1.3, 3.2.1(Including MUs for all the HP 3PAR OS versions). The Host Operating Systems supported with this release of HP 3PAR StoreServ Storage PowerShell toolkit are Windows 7, Windows 7 SP1, Windows 8, Windows 8.1, Windows Server 2008 SP1, Windows Server 2008 R2, Windows Server 2008 R2 SP1, Windows Server 2012 and Windows Server 2012 R2.

HP 3PAR PowerShell Toolkit along with its documentation is now available for free download from the Software Depot link .

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=3PARPSToolkit
jitxart
Posts: 2
Joined: Mon Jul 06, 2015 11:30 am

Re: HP 3PAR PowerShell Toolkit

Post by jitxart »

Good afternnon,

I have downloaded and installed the kit but I don't know how to establish the connection with the 3PAR. I have looked at the documentation but I can't see how to do it.

In the documentation is explained that to create a connection object you have to use the cmdlet New-SANConnection but it doesn't establish the connection itself, it just creates the object.

What I am looking for is something similar to the Connect-VIServer used to connect to the VMware vCenter server using VMware PowerCLi. There is something similar for 3PAR?

Many thanks,

Joan
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: HP 3PAR PowerShell Toolkit

Post by Richard Siemers »

Did you see the part about having to download plink.exe from PuTTy's website?
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
jitxart
Posts: 2
Joined: Mon Jul 06, 2015 11:30 am

Re: HP 3PAR PowerShell Toolkit

Post by jitxart »

Thanks,

Yes, I did. But what it says is just copy the plink to folder c:\PLink what I already did.
I folowed the next steps but it's not specified how to connect

1. Unzip the package and copy the folder HP3PARPSToolkit to one of the following locations:
• %USERPROFILE%\Documents\WindowsPowerShell\Modules\
Copy to this user specific location to make HP 3PAR StoreServ Storage PowerShell Toolkit
v1.0 available for the currently logged in Windows user.
• %SYSTEMROOT%\system32\WindowsPowerShell\v1.0\Modules\
Copy to this system location to make HP 3PAR StoreServ Storage PowerShell Toolkit v1.0
available for all users.
2. Confirm or Copy the Plink software to this location:
c:\Plink\plink.exe
3. Open an interactive PowerShell console.
4. Import the toolkit module to the supported Windows host as follows:
PS C:\>Import-Module HP3PARPSToolkit
The Log file location is:
%USERPROFILE%\Documents\WindowsPowerShell\Modules\Logs\
%SYSTEMROOT%\system32\WindowsPowerShell\v1.0\Modules\Logs\

Many thanks,

Joan
apol
Posts: 267
Joined: Wed May 07, 2014 1:51 am

Re: HP 3PAR PowerShell Toolkit

Post by apol »

Hi, the basic mechanism is:

Code: Select all

$SANUsername  = <whatever>
$SANUserPW = <whatever>
$IPAddress  = <whatever>
$SSHDIR = "C:\Plink"

$myconnection = New-SANConnection -SANUserName $SANUsername -SANPassword $SANUserPW -SANIPAddress $IPAddress -SSHDir $SSHDIR

Get-3parHostPorts -SANConnection $myconnection


But to be honest, I don't have any idea why most of the get- commands do not require a SANConnection-Parameter, or why all commands still work after you tinker with the SANConnection-Object, like $myconnection = "FALSE"...
When all else fails, read the instructions.
hdtvguy
Posts: 576
Joined: Sun Jul 29, 2012 9:30 am

Re: HP 3PAR PowerShell Toolkit

Post by hdtvguy »

What the Powershell integration relies on plink? Really? Please tell me that is not so? What a useless waste of development resources to make a Powershell Integration tool that does nothing but front end plink! First SSMC, then SSMC SR and now this, their "management software team" needs to be fired and they need to rethink their vision. I am having a tough time staying 3par fan when this is their direction. I have at least 7 cases open on SSMC and virtually everyone of them is a new bug to be fixed in the future. SSMC SR can not even come close to what external SR can do. 3par is really disappointing me a lot lately.
hdtvguy
Posts: 576
Joined: Sun Jul 29, 2012 9:30 am

Re: HP 3PAR PowerShell Toolkit

Post by hdtvguy »

hdtvguy wrote:What the Powershell integration relies on plink? Really? Please tell me that is not so? What a useless waste of development resources to make a Powershell Integration tool that does nothing but front end plink! First SSMC, then SSMC SR and now this, their "management software team" needs to be fired and they need to rethink their vision. I am having a tough time staying 3par fan when this is their direction. I have at least 7 cases open on SSMC and virtually everyone of them is a new bug to be fixed in the future. SSMC SR can not even come close to what external SR can do. 3par is really disappointing me a lot lately.


I have been informed this issue has been heard and may be addressed in future version of the powershell toolkit. Seems the 1.0 has a very limited set of basic commands anyway. When it gets more robust and can do the majority of the command line, including all RC functions and not need plink then I will give it a serious look.
atkinsroy
Posts: 3
Joined: Sat Oct 17, 2015 10:01 pm

Re: HP 3PAR PowerShell Toolkit

Post by atkinsroy »

I agree. Its disappointing to see a PowerShell module that relies on plink. I'd expect:

1. A properly written module released as a binary with no requirement for other software

2. The most basic expectation for a professionally released PowerShell cmdLet is that it accepts and outputs a single object - this unleases the full capabilities of PowerShell (pipelining etc.). Producing text output simply isn't good enough.

3. Parameters that make sense and are robust enough to accept multiple "correct" answers.
Case in point, the very first command I looked at:

New-3PARsshconnection - this cmdlet only accepts the IP address, not the FQDN. When the plink command it relies on accepts both! Annoying. It gets worse - the first time you run this, you get the normal ssh warning about the servers host key not being in the cache. And the cmdLet has no option to deal with this. And the usual fix of piping "y" to the cmdLet also doesn't work.

So, you have to know how to fix this before use the toolkit - enter the command echo y | plink with the appropriate IP address (again don't use the FQDN, the cmdLet expects the IP).

It all just feels like a half assed job. Other storage vendors are doing a better job here. Given the popularity of automation and orchestration, this should be given more attention.
Steve415
Posts: 13
Joined: Thu May 23, 2013 7:47 pm

Re: HP 3PAR PowerShell Toolkit

Post by Steve415 »

Wow, this is disappointing and I'm glad I read this post before I started diving into the Toolkit.

Would it be better to try using PowerShell to make REST calls against the web services API? Or just stick with more conventional means of scripting against the 3PAR arrays, like the 3PAR CLI?

I'm about to start writing my first scripts for 3PAR and it's difficult to pick a place to start...
nsnidanko
Posts: 116
Joined: Mon Feb 03, 2014 9:40 am

Re: HP 3PAR PowerShell Toolkit

Post by nsnidanko »

Steve415 wrote:Wow, this is disappointing and I'm glad I read this post before I started diving into the Toolkit.

Would it be better to try using PowerShell to make REST calls against the web services API? Or just stick with more conventional means of scripting against the 3PAR arrays, like the 3PAR CLI?

I'm about to start writing my first scripts for 3PAR and it's difficult to pick a place to start...


I've looked at powershell toolkit and it is a joke. If you're running pretty recent firmware (such as 3.2.1), i suggest looking at WSAPI. They keep adding new functionality with each firmware release.
I think HP should build Powershell wrapper modules around WSAPI.
Post Reply