Add RDM Size info to VI Client using Powershell

I have had a lot of comments on my sample scripts that add information to the VI Client using Custom Fields. I did have to resolve some issues with the scripts, so I have updated the scripts in the original post here. Be sure to refresh your browser to get the latest versions.

In the VMware VI Toolkit Communities, a request was made for a similar script that adds the total size of all Raw Device Mappings (RDMs) on a VM to a Custom Field in the VI Client. The difference between this sample script and the ones I showed you earlier, is that the information is now pulled from $VM and not from $VMView. So I pulled the Get-View command inside the loop and here’s the result:

add-vmrdmsize (rename to .ps1)

Let me know if you can’t get it to work.

Hugo

kieran foran working the phones for the NBA Jerseys Cheap warriors but can he playOr maybe you hope to use the logo of the hometown team to increase attendance at a fundraiser where you offering game Wholesale Jerseys tickets as a raffle prize. That said, at 4 4, the Steelers are running out of the leeway that I give most good teams. According to NFL rules, each team can only have 90 players when training camp starts. The immediate pressures on the Dogs were that Griffen was nfl jerseys cheap walking, along with Shaun Higgins, Cooney was up for sale, and they had just shoved their coach. She was soon joined in the lawsuit by a second former Raiderette, Sarah G. 14: We will evolve. In his article, he pointed out that Gilead made more money than all IBB peers combined in 2015 and is on track to do so again in 2016. Indeed, the game is riding high on more than fifteen years of labor peace, shrewd stewardship, and savvy marketing. I don’t want to be complicit in that and if I’m paying them if I’m among the people giving them their reinforcement by cheering Fake Oakleys and by giving them the money to harm themselves, I’m complicit in it.. CBS just ended one of the most remarkable 3 week periods in the history of television with our broadcast of the AFC Championship Game, the Super Bowl and the Grammy Awards. Johnson: He came over from rugby league. http://www.ray-banbaratas.top It wasn’t all negative for Yamana Gold though. Todd Gurley was the smart choice in this position, as he was the number one back on most draft boards, including mine. The only thing she said was that Esteban Santiago had been tremendously affected by seeing a bomb explode next to two of his friends when he was around 18 years old while serving in Iraq.. Customers can now stream games or shows using Netflix or other providers, reducing the demand for cable subscriptions. They’ve compared him to other college dropouts; from Kanye West to some guy who runs the IT Department at Bradley College. Sometimes these jeans will revert back to a more looser size as they are worn which results in them being dried again to tighten the fabric back up.. And that’s really where the fight was. Whoa! Does it scare you? Well, I am cheap oakleys not surprised. It is estimated that employment opportunities will increase by 37 percent by 2018. They stole the pennant from the Dodger fans, http://www.fakeoakleysaler.com still the greatest fans who ever lived. At first i believe that my injury was a muscle upper my left arm pit over and over just a tad to the left (towards the back fat). 10. This is an important lesson in how to train a dog. A crew of 30 is on site at training camp for the series, which launched in 2001 chronicling the Baltimore Ravens, and since has won 14 Sports Emmys..

7 thoughts on “Add RDM Size info to VI Client using Powershell”

  1. Howdy Hugo!

    That is a nice readable script. I thought I would make one suggestion that I’ve started doing more and more with my scripts. You have the following:

    $VMs = Get-VM
    ForEach ($VM in $VMs)

    Lately I’ve been collapsing that into a single line because I think it is more readable/maintainable (and I don’t have to think up a good variable name!). It would be:

    ForEach ($VM in Get-VM)

    Jeffrey Snover [MSFT]
    Windows Management Partner Architect
    Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
    Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

    »crosslinked«

  2. @Jeffrey Snover
    Hey Jeffrey,
    Thanks!
    I do tend to use that technique when that part of the script is inside a loop, so that I don’t have to Clear-Variable the extra variable. At other times, when the first line needs an additional pipe to Where-Object, I often keep them on two separate lines for readability.
    I write my scripts mostly off the top of my head, so that’s probably why I sometimes create to much variables. I need to look them over more often when they are done to consolidate some of the clutter into single lines.
    Thanks for the tip! And I must say it’s an honor to have you on my blog ๐Ÿ˜‰
    Hugo

  3. Pingback: Anonymous
  4. Hello,
    It’s doesn’t work for me. The return size for the RDM disk is not right… do you have this problem ?

    Thanks in advance

  5. Hi Hugo,

    Nice script, helps me a lot for my disk usage reports.

    I don’t know if you do a script on demand ;-), but I’m looking for a PS script that puts the foldername where my VM is situated as an attribute.

    The reason why I need this is because I will recreate my clusters and otherwise I will lose all my foldernames where Ive’ put them.

    The logic we use is
    Cluster => Foldername => vm
    or
    Cluster => Foldername => Subfolder => vm

    Hope you know an easy way to achieve this.

    Cheers,

    David

Leave a Reply