Powershell Scripting discovery
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.
- Richard Siemers
- Site Admin
- Posts: 1333
- Joined: Tue Aug 18, 2009 10:35 pm
- Location: Dallas, Texas
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,
Thanks,
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
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.
Honestly, finding this has made me more disappointed in the ps toolkit, because adding all cli commands into cmdlets as functions should be trivial.
- Richard Siemers
- Site Admin
- Posts: 1333
- Joined: Tue Aug 18, 2009 10:35 pm
- Location: Dallas, Texas
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.
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
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.