2009-4
1
Powershell

I have two pieces of cool news on my book, Managing VMware Infrastructure with PowerShell: TFM. First, it should be going to print around April 15th! I think it’ll be available on pre-order before then, but I don’t know precisely when that will happen. Second, VMware has partnered with my publisher to make a 10% off coupon available to ISVs and IHVs. If you are currently on VMware’s TAP mailing list, look for that coupon to arrive in the March newsletter which should be in your inbox now.

: http://halr9000.com/article/715

Marvin Blackburn
2009-06-29 13:58:42

I purchased your book as I am a newbie to powershell. I downloaded the get-parameter script, but can’t get it to run on the PowerCLI. Not sure what I’m doing wrong. I do have some other simple scripts that run, so I”m not sure what is wrong.

2009-06-29 14:05:06

Once you have the function in a script, you have to “dot-source” it. Dot sourcing is explained here: http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/run.mspx#EMBAC. Then, the function is available to be executed like so:

get-parameter get-childitem

And don’t forget my gpm function which is equal to:

Get-Parameter [cmdlet or alias] | ft name,type,is*,pipe* -GroupBy parameterset -AutoSize

Marvin Blackburn
2009-07-14 13:05:29

I ended up putting this at the bottom of the script

Get-Parameter [cmdlet or alias] | ft name,type,is*,pipe* -GroupBy parameterset -AutoSize
gpm ( $args[0] )

I run this from command line. I coulnd not seem to be able define it in such a way to be available in the shell.

Get-Paramter get-eventlog
gives the output like the book.

Thanks for your help. I’m finding the book to be most helpful.
My needs are mostly reporting and monitoring, but I the rest of it will be helpful also.

2009-07-14 14:19:48

Put this line at the bottom of the get-parameter script.

function gpm ($command) { Get-Parameter $command | ft name,type,is*,pipe* -GroupBy parameterset -AutoSize }

  • Microblog

  • Recent Posts

  • Recent Comments

  • meta

  • PowerShell Blogroll