I’ve had several people ask to understand more about Get-View. I will be doing several blog posts on this topic to hopefully help educate on what Get-View is and why it’s useful.
- Part 1: Introduction
- Part 2: Extension Data
- Part 3: Performance Impact
***Note: Get-view is a more advanced feature of PowerCLI. Administrators are able to fully utilize the benefits of PowerCLI without needing to learn Get-View. However, Get-view opens the door for even more flexibility and power in controlling your virtual environment.
Before dealing with Get-View, we need to understand a little bit about how PowerCLI works. The cmdlets like Get-VM will return nicely formatted information about a Virtual Machine, however, when Get-VM is run, there are a number of queries and formatting that takes place in the back-end that result in what is returned.
What happens when we return this same list using Get-View?
As you can see, a lot more information is returned. If this is the first time you are seeing this output, it can feel a little overwhelming and you will most likely want to just return to using Get-VM. But before you run off, let’s take a deeper look at this and try to understand what we are seeing.
To make this easier to sort through for this first time, let’s run the get-view cmdlet again but this time we’ll filter it for a single VM.
The –Filter parameter requires a hashtable for input, otherwise you’ll receive an error like this:
So we’ll run it the correct way and we’ll search based on the VM’s name.
get-view –viewtype VirtualMachine –filter @{“Name”=”SDDC-VCAC-IAAS”}
Ok, that’s not looking so bad now is it? ok, well you may still be saying “I don’t understand what I’m seeing….” but we have narrowed down the number of lines returned by looking at a single Virtual Machine.
What are we seeing?
What we see when running Get-View is the view object (Do not confuse ‘view object’ with ‘VIobject’ we’ll discuss this later). We can then dig into the different properties for this object and find large sums of information that may be useful for your needs.
We’ll first save our query as a variable:
$VM = get-view –viewtype VirtualMachine –filter @{“Name”=”SDDC-VCAC-IAAS”}
Now by typing the variable name ‘$VM’ we can see and work with the object.
It may take some practice and some time to get to know what all can be found within the view of each object… Don’t despair, it’s well worth it! let’s look in the Config property (VirtualMachineConfigInfo).
$VM.config
Here we can see some interesting information. We can see the VM Name, the Guest full name (Server 2008r2 64-bit), Hardware version, UUID, if it’s a template, and so on. These could be very useful when querying your infrastructure for reporting purposes especially (More to come in another blog post).
If we jump into the Summary section we see a number of other sections we can dive into. We’ll start with Runtime.
$VM.Summary.Runtime
We can see the VM is connected, powered off, VMTools installer is not mounted, etc.
On to Guest:
$VM.Summary.Guest
We can see here that VMTools is not running, the version is current, hostname, and IP would be here if the VM were powered on. For those of you who may want to write a script that sees if a VM is up and running before continuing, using the ToolsStatus property in a loop is an excellent way to judge if the script should proceed or loop again (*note: just because tools are running doesn’t mean the OS is always ready. sometimes it is good to place a start-sleep in the script once VMTools shows it is running, to ensure that the OS is fully up and running before continuing).
Finally, We’ll look at the Summary Config (do not get confused with the $VM.Config we looked at earlier):
$VM.Summary.Config
Here we see the amount of RAM allocated to the VM, the actual path to the VMX (in this case it’s [Datastore] Folder/VMName.vmx), # of CPU, NICs, Disks, and more.
In just a few queries we’ve been able to see a lot of data…
In the next article we will discuss how to use the data we find. and an even easier way of accessing this data for consumption.
Stay Tuned!
Where oh where is the chain length info?
this is nice but how do we change certain values here? Let us say i want to change the startorder & startdelay to something else.
(get-vapp myvapp | get-view).VAppConfig.EntityConfig
Basically with powercli i want to
create vapp
set startorder
startdelay
startaction
stopdelay
stopaction
To change any of those things, I think you would need to operate on the VM-type object, not the View-of-a-VM-type object.
Good cmdlet but how to query SpaceUsage of a VM with GET-VIEW only and not GET-VM ?
Terrifiϲ work! Thhis is the type of information that are
supрosed to be hared across tthe internet. Disgrace on Google ffor no longer positioning thiѕ publish upper!
Comme on օver and visit my website . Thanks =)
NIC/VMTool/Hardware Detail Along With OS Version – Look for Script
Terrifiϲ work! Thhis is the type of information that are
supрosed to be hared across tthe internet. Disgrace on Google ffor no longer positioning thiѕ publish upper!
Comme on օver and visit my website . Thanks =)
If I use –filter @{“Name”=”NS”} (I have a VM called NS) it returns multiple VMs that contains “NS” in their name.
How to filter to match exact name?
Too late to be helpful, but for the next person, the answer is that the filter is regex, so you’d need to specify the beginning and end of the string like this:
@{ name = ‘^computername$’ }
^ means the beginning of the string
$ means the end of the string
Great web site you have got here.. It’s hard to find quality writing like yours these days. I really appreciate individuals like you! Take care!!
Hello first time I visit your website. I open some posts and find quality of work, I also like your website layout. I have bookmark your website and again I will visit your website soon.
You apologies! This is the most trending Yeh Hai Chahatein drama (@YehHaiChahatein).
Good
Colors TV is providing the best TV show Pinjara Khubsurti Ka By Ekta Kapoor. You can watch and download easily without any cost.
According to Phillips the best way to entertain peoples is by giving them best TV shows which Colors TV is giving now.
Apne TV
The Best South African TV show of all the time is The Queen Full Episode.
Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective.Thank you and good luck for the upcoming articles.
Watch Desi Tv Show Colors Tv Desi Drama Serial Video Episodes. desitvshow.su – Made In India is an Indian reality and stunt television series.Desi Tv Shows
Greate article. Keep writing such kind of info on your site.
Im really impressed by your site. apkmodonline at https://apkmodonline.net/
Because in this site i can downloading and installing apps and games easyly.
Mehndi Hai Rachne Wali Star Plus Desi Serial all Episodes HD. Mehndi Hai Rachne Wali is An Indian Television Series. The Series Which Will Be Premier On 15th February 2021 at 6:30 PM (IST). Mehndi Hai Rachne Wali
Greate article. Keep writing such kind of info on your site.
Im really impressed by your site. apkmodonline at https://apkmodonline.net/
Because in this site i can downloading and installing apps and games easyly.
Watch Your Bigg Boss 15 Desi Drama Tv Serials Online Bigg Boss 15
The Way Your Write This Is Awesome 9Anime
kissasians.mobi provides the latest HD episodes for all the most popular kiss asian & Dramacool releases worldwide. Best Korean Drama And Kshow HD
Watch English Anime Online Subbed,GOGO Anime.
The Way Your Write This Is Awesome
The Way Your Write This Is Awesome
the content you shared is very usefull. thank you
Pretty good post. I have just stumbled upon your blog and enjoyed reading your blog posts very much. I am looking for new posts to get more precious info. Big thanks for the useful info.
https://newbissmillahphotostat.site/
The Content you Shared is very usefull. Keep it up
Thank You
this content helps me A lot thanks!
The Content you Shared is very usefull. Keep it up!
hi plaes visit https://teleseryee.su
hi pleas visit this site https://teleseryee.su enjoy latest dramas show.
Kepala Bergetar Tonton Malay Drama dan Download Malay Telefilem dan Filem, Kbergetar Tonton Cerekarama Melayu.
Kepala Bergetar Tonton drama Melayu Online Live Episod.
This Website is a best platform containing Hollywood, Bollywood and Telugu fee Latest Movies to Entertain you.
This is a Best Website Containing latest Hollywood, Bollywood, Telugu, Malayalam, Tamil, Punjabi and Hindi Dubbed Movies. You can watch here and download Movies in HD
This is a Best Website Containing latest Hollywood, Bollywood, Telugu, Malayalam, Tamil, Punjabi and Hindi Dubbed Movies.
i love to read your site very good site layout thanks
The Crawling Head Watch Now Drama Malaysia Online Live Episode
Welcome to TV3 Online Drama, home of the Malay Dramas Our Tv1 Online dramas are the top Melayu drama video and will be providing an Astro Ria drama video episods!
Kepala bergetar Bisik-Bisik Gelora Epi 16 TV3 Drama, Terkini Bisik-Bisik Gelora Gempak Episod 16 Terbaru Malaysia Akasia TV3 Drama. Cerekarama Melayu Tonton Online Drama Video. Bisik-Bisik Gelora Episode 16 myinfotaip Malay Drama dfm2u Video dan Download. Terbaru Filem. Bisik-Bisik Gelora Live Episod 16
Tonton Drama HD Quality Video On kepalabergetar6.com
https://kepalabergetar6.com/bisik-bisik-gelora-episod-16-tv3-malay-drama/
Kepala bergetar Bisik-Bisik Gelora Epi 17 TV3 Drama, Terkini Bisik-Bisik Gelora Gempak Episod 17 Terbaru Malaysia Akasia TV3 Drama. Cerekarama Melayu Tonton Online Drama Video. Bisik-Bisik Gelora Episode 17 myinfotaip Malay Drama dfm2u Video dan Download. Terbaru Filem. Bisik-Bisik Gelora Live Episod 17 Tonton Drama HD Quality Video On kepalabergetar6.com
https://kepalabergetar6.com/bisik-bisik-gelora-episod-17-tv3-malay-drama/
https://moviemad.lol/
watch webseries
https://moviemad.lol/
moviemad
https://moviemad.lol/
watch new series
Risik Pada Hati
Your Work On Blog Is Very Good Thank You And Keep it up, I Visited Daily On Your Website.
Tonton dan Download Drama Kepala Bergetar Episod Kepala Bergetar Drama Dan Download. Tonton Gempak Terbaru Filem Malaysia. Malay Drama dfm2u.
Drama Malaysia Online Episod Terkini on Kepala Bergetar,
Melayu TV Drama Online Full Episod. Tonton Melayu Drama Live Video Terkini Full Episod Online.
Watch your best malay dramas and tv shows online. Tonton Dramas is a intresting dramas serial by malalysian chanel Tonton
kepalabergetar-tv.com
Animeflv es el mejor sitio web gratuito de transmisión de anime donde puedes ver anime subtitulado y doblado en inglés en línea.
This is a Best Website Containing latest Hollywood, Bollywood, Telugu, Malayalam, Tamil, Punjabi and Hindi Dubbed Movies.
https://moviewatchonline.com.pk/download-crisis-2021-dual-audio-hindi-english-480p-450mb-720p-1-1gb-1080p-2-5gb/
https://myflixer.shop/
MyFlixer is a great streaming site for those who want to watch their favorite movies and TV series online. myflixer movies online, We let you watch movies …
I really appreciate reading such kinds of blogs WWE WRESTLING
Love your post dear
Kepala Episod
Love your post dear
Kepala Episod
Love your post dear
Kepala Episod
Love your post dear
Kepala Episod
Nice to see that new trends and regulations starting to take effect at the consumer side. Seems to be a good step towards customer satisfaction and security.
My page is similar to yours,please take a moment to read everything carefully and let me know what you think Apnetv
watch movies in HD
watch the best movies telugu, tulugu dubbed from this site
watch online movies on this site
Chinese Dramas
Nice Post! I appreciate your Post, valuable photoshot. This list is really helpful. Thanks for posting.
very good post…..
Thank you for sharing. I am one of the many people who are writing #blogs as part of my website,
Thank you for these tips. Awesome tips.