HPE Storage Users Group
https://3parug.com/

Powershell Scripting discovery
https://3parug.com/viewtopic.php?f=17&t=2095
Page 1 of 1

Author:  nabarry [ Wed Jun 29, 2016 11:27 am ]
Post subject:  Powershell Scripting discovery

I've seen some posts where people (rightly) view the 3par powershell toolkit is just not up to the standards we'd hope for. I agree, but today I discovered a slight hack: if you import the vs-functions.psm1 that's included with the toolkit, you can pass arbitrary commands to your array using the cmdlet invoke-3parclicmd, which the main toolkit fleshes out into individual cmdlets and options. Obviously, the preferred method would be for the toolkit to support all commands and return actual object output, but this is helpful for calling commands that aren't included but might be necessary for some scripted action.

Author:  Richard Siemers [ Wed Jun 29, 2016 9:34 pm ]
Post subject:  Re: Powershell Scripting discovery

What is the benefit of using vs-functions over say calling plink.exe or the 3PAR cli commands directly within powershell?

Thanks,

Author:  nabarry [ Thu Jun 30, 2016 8:40 am ]
Post subject:  Re: Powershell Scripting discovery

Not huge. The main advantage is it still takes the san connection objects from the PS toolkit, so essentially with that import line, you don't need to manipulate plink or have credentials in your script, and can just keep reusing the same connection object as in the rest of your script with the ability to pass arbitrary commands.

Honestly, finding this has made me more disappointed in the ps toolkit, because adding all cli commands into cmdlets as functions should be trivial.

Author:  Richard Siemers [ Tue Jul 05, 2016 10:03 pm ]
Post subject:  Re: Powershell Scripting discovery

nabarry wrote:
Honestly, finding this has made me more disappointed in the ps toolkit, because adding all cli commands into cmdlets as functions should be trivial.


I agree 100%. One of these days I will need to crack the book on the 3PAR https api.

Author:  nabarry [ Wed Jul 06, 2016 8:32 am ]
Post subject:  Re: Powershell Scripting discovery

I've definitely been considering it given the limited functionality exposed via powershell, and especially the way it mixes returning raw text and actual objects. Honestly, it looks like something someone at HPE is doing in their free time rather than an official supported project. I mean, even their iLO cmdlets are more thorough.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/