HPE Storage Users Group

A Storage Administrator Community




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Powershell Scripting discovery
PostPosted: Wed Jun 29, 2016 11:27 am 

Joined: Wed Jun 29, 2016 11:20 am
Posts: 17
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Powershell Scripting discovery
PostPosted: Wed Jun 29, 2016 9:34 pm 
Site Admin
User avatar

Joined: Tue Aug 18, 2009 10:35 pm
Posts: 1328
Location: Dallas, Texas
What is the benefit of using vs-functions over say calling plink.exe or the 3PAR cli commands directly within powershell?

Thanks,

_________________
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.


Top
 Profile  
Reply with quote  
 Post subject: Re: Powershell Scripting discovery
PostPosted: Thu Jun 30, 2016 8:40 am 

Joined: Wed Jun 29, 2016 11:20 am
Posts: 17
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Powershell Scripting discovery
PostPosted: Tue Jul 05, 2016 10:03 pm 
Site Admin
User avatar

Joined: Tue Aug 18, 2009 10:35 pm
Posts: 1328
Location: Dallas, Texas
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Powershell Scripting discovery
PostPosted: Wed Jul 06, 2016 8:32 am 

Joined: Wed Jun 29, 2016 11:20 am
Posts: 17
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: Google [Bot] and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group | DVGFX2 by: Matt