jumebv

Bouke Groenescheij

My personal adventures in the quest for virtual perfectness.

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Login
    Login Login form

View PowerCLI - Get-Pool

on
  • Font size: Larger Smaller
  • Hits: 14903
  • 0 Comment
  • Subscribe to this entry
  • Print

I'm writing a Powershell script on getting info from a View environment. One thing I noticed was the amount of time the 'Get-Pool' commandlet takes to finish when using '-pool_id'. Now I know the commandlets are not very well written (it is sooo 1980s to run the commands from a broker), but take a look at this example:

Measure-Command{$poolinfo = Get-Pool -pool_id $PoolName}
Measure-Command{$poolinfo = Get-Pool}

Result:

TotalSeconds      : 72,5700939
TotalSeconds      : 67,5125034

Damn, I knew it was bad - but it is even worse than I thought. I guess it is better to load Get-Pool into a variable and then work from there instead of using '-pool-id'. To be continued...

Edit: I have found most commandlets are behaving the same. So in a way: don't use filters like '-pool-id' on the View commandlets: they use more resources and takes more time to complete.

Last modified on
Tagged in: PowerCLI Powershell View
Trackback URL for this blog entry.

Comments

  • No comments made yet. Be the first to submit a comment

Leave your comment

Guest Monday, 27 March 2017