<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Get VMInformation Using Powershell and PowerCLI	</title>
	<atom:link href="https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/feed/" rel="self" type="application/rss+xml" />
	<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/</link>
	<description>Documenting My Life as a System Administrator</description>
	<lastBuildDate>Tue, 18 Apr 2023 13:18:10 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: Steve		</title>
		<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-10582</link>

		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Tue, 18 Apr 2023 13:18:10 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1741#comment-10582</guid>

					<description><![CDATA[Hi Paul, How could I add the Memorym CPU, and Disk Allocations to the data returned?]]></description>
			<content:encoded><![CDATA[<p>Hi Paul, How could I add the Memorym CPU, and Disk Allocations to the data returned?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: George Perkins		</title>
		<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-8385</link>

		<dc:creator><![CDATA[George Perkins]]></dc:creator>
		<pubDate>Fri, 17 Feb 2023 21:09:43 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1741#comment-8385</guid>

					<description><![CDATA[This function is extremely helpful! Thank you for posting it. I added an VM attribute for &#039;$secureBootSetting&#039; (EFI) which I needed because of the Feb 2023 bug from Microsoft. I also piped the output to a .csv

try {
                $vCenter = $Object.Uid -replace &quot;.+@&quot;; $vCenter = $vCenter -replace &quot;:.+&quot;
				$secureBootSetting = if ($vm.ExtensionData.Config.BootOptions.EfiSecureBootEnabled) { &quot;enabled&quot; } else { &quot;disabled&quot; }
                [PSCustomObject]@{
                    Name        = $Object.Name
                    PowerState  = $Object.PowerState
                    vCenter     = $vCenter
                    Datacenter  = $Object.VMHost &#124; Get-Datacenter &#124; select -ExpandProperty Name
                    Cluster     = $Object.VMhost &#124; Get-Cluster &#124; select -ExpandProperty Name
                    VMHost      = $Object.VMhost
                    Datastore   = ($Object &#124; Get-Datastore &#124; select -ExpandProperty Name) -join &#039;, &#039;
                    FolderName  = $Object.Folder
                    GuestOS     = $Object.ExtensionData.Config.GuestFullName
					SecureBoot  = $secureBootSetting
                    NetworkName = ($Object &#124; Get-NetworkAdapter &#124; select -ExpandProperty NetworkName) -join &#039;, &#039;
                    IPAddress   = ($Object.ExtensionData.Summary.Guest.IPAddress) -join &#039;, &#039;
                    MacAddress  = ($Object &#124; Get-NetworkAdapter &#124; select -ExpandProperty MacAddress) -join &#039;, &#039;
                    VMTools     = $Object.ExtensionData.Guest.ToolsVersionStatus2
                }


Get-VM &#124; Get-VMInformation &#124; Select-Object Name,PowerState,vCenter,Datacenter,Cluster,VMHost,Datastore,FolderName,GuestOS,SecureBoot,NetworkName,IPAddress,MacAddress,VMTools &#124; Sort-Object Name &#124; Export-Csv -Path &quot;C:\Temp\AllVMInformation.csv&quot; -NoTypeInformation]]></description>
			<content:encoded><![CDATA[<p>This function is extremely helpful! Thank you for posting it. I added an VM attribute for &#8216;$secureBootSetting&#8217; (EFI) which I needed because of the Feb 2023 bug from Microsoft. I also piped the output to a .csv</p>
<p>try {<br />
                $vCenter = $Object.Uid -replace &#8220;.+@&#8221;; $vCenter = $vCenter -replace &#8220;:.+&#8221;<br />
				$secureBootSetting = if ($vm.ExtensionData.Config.BootOptions.EfiSecureBootEnabled) { &#8220;enabled&#8221; } else { &#8220;disabled&#8221; }<br />
                [PSCustomObject]@{<br />
                    Name        = $Object.Name<br />
                    PowerState  = $Object.PowerState<br />
                    vCenter     = $vCenter<br />
                    Datacenter  = $Object.VMHost | Get-Datacenter | select -ExpandProperty Name<br />
                    Cluster     = $Object.VMhost | Get-Cluster | select -ExpandProperty Name<br />
                    VMHost      = $Object.VMhost<br />
                    Datastore   = ($Object | Get-Datastore | select -ExpandProperty Name) -join &#8216;, &#8216;<br />
                    FolderName  = $Object.Folder<br />
                    GuestOS     = $Object.ExtensionData.Config.GuestFullName<br />
					SecureBoot  = $secureBootSetting<br />
                    NetworkName = ($Object | Get-NetworkAdapter | select -ExpandProperty NetworkName) -join &#8216;, &#8216;<br />
                    IPAddress   = ($Object.ExtensionData.Summary.Guest.IPAddress) -join &#8216;, &#8216;<br />
                    MacAddress  = ($Object | Get-NetworkAdapter | select -ExpandProperty MacAddress) -join &#8216;, &#8216;<br />
                    VMTools     = $Object.ExtensionData.Guest.ToolsVersionStatus2<br />
                }</p>
<p>Get-VM | Get-VMInformation | Select-Object Name,PowerState,vCenter,Datacenter,Cluster,VMHost,Datastore,FolderName,GuestOS,SecureBoot,NetworkName,IPAddress,MacAddress,VMTools | Sort-Object Name | Export-Csv -Path &#8220;C:\Temp\AllVMInformation.csv&#8221; -NoTypeInformation</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Tony		</title>
		<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-8282</link>

		<dc:creator><![CDATA[Tony]]></dc:creator>
		<pubDate>Tue, 14 Feb 2023 18:32:15 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1741#comment-8282</guid>

					<description><![CDATA[This is great.  very helpful.  how can I also get the notes from the VM&#039;s]]></description>
			<content:encoded><![CDATA[<p>This is great.  very helpful.  how can I also get the notes from the VM&#8217;s</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steve Gott		</title>
		<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6311</link>

		<dc:creator><![CDATA[Steve Gott]]></dc:creator>
		<pubDate>Fri, 02 Dec 2022 16:54:49 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1741#comment-6311</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6294&quot;&gt;Paul&lt;/a&gt;.

Thanks much that works like a charm!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6294">Paul</a>.</p>
<p>Thanks much that works like a charm!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Paul		</title>
		<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6294</link>

		<dc:creator><![CDATA[Paul]]></dc:creator>
		<pubDate>Fri, 02 Dec 2022 01:40:18 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1741#comment-6294</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6280&quot;&gt;Steve Gott&lt;/a&gt;.

You won&#039;t get the desired results in a foreach loop. However with this function you can do

Get-VMInformation -Name $VMs &#124; ft -Autosize
or
$VMList = Foreach ($VM in $VMs) {Get-VMInformation -Name $VM}
$VMList &#124; ft -autosize

with this many attributes I would personally export it to csv.
Foreach ($VM in $VMs) {Get-VMInformation -Name $VM &#124; export-csv $home\desktop\vminformation.csv -notypeinformation -append}]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6280">Steve Gott</a>.</p>
<p>You won&#8217;t get the desired results in a foreach loop. However with this function you can do</p>
<p>Get-VMInformation -Name $VMs | ft -Autosize<br />
or<br />
$VMList = Foreach ($VM in $VMs) {Get-VMInformation -Name $VM}<br />
$VMList | ft -autosize</p>
<p>with this many attributes I would personally export it to csv.<br />
Foreach ($VM in $VMs) {Get-VMInformation -Name $VM | export-csv $home\desktop\vminformation.csv -notypeinformation -append}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steve Gott		</title>
		<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6280</link>

		<dc:creator><![CDATA[Steve Gott]]></dc:creator>
		<pubDate>Thu, 01 Dec 2022 19:39:02 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1741#comment-6280</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6277&quot;&gt;Paul&lt;/a&gt;.

I am piping all of the vm&#039;s from my vCenter through the function like this:
Foreach ($VM in $VMs) {Get-VMInformation -Name $VM}.
Are you saying that I could achieve the desired format with this:
Foreach ($VM in $VMs) {Get-VMInformation -Name $VM &#124; ft -Autosize }.

Thanks for the quick reply!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6277">Paul</a>.</p>
<p>I am piping all of the vm&#8217;s from my vCenter through the function like this:<br />
Foreach ($VM in $VMs) {Get-VMInformation -Name $VM}.<br />
Are you saying that I could achieve the desired format with this:<br />
Foreach ($VM in $VMs) {Get-VMInformation -Name $VM | ft -Autosize }.</p>
<p>Thanks for the quick reply!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Paul		</title>
		<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6277</link>

		<dc:creator><![CDATA[Paul]]></dc:creator>
		<pubDate>Thu, 01 Dec 2022 16:52:03 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1741#comment-6277</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6276&quot;&gt;Steve Gott&lt;/a&gt;.

You can do this one of 2 ways.  Open Powershell as a full windows and add &#124; ft -Autosize

Or you can export the output to csv.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6276">Steve Gott</a>.</p>
<p>You can do this one of 2 ways.  Open Powershell as a full windows and add | ft -Autosize</p>
<p>Or you can export the output to csv.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steve Gott		</title>
		<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-6276</link>

		<dc:creator><![CDATA[Steve Gott]]></dc:creator>
		<pubDate>Thu, 01 Dec 2022 16:43:17 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1741#comment-6276</guid>

					<description><![CDATA[How would I change the output to columns where you have rows? Your output flows like this:
Name        
PowerState  
vCenter     
Datacenter  
Cluster     
VMHost      
Datastore   
FolderName  
GuestOS     
NetworkName 
IPAddress   
MacAddress  
VMTools     
 For me it would be much better if each of those rows was a column.
Thanks!]]></description>
			<content:encoded><![CDATA[<p>How would I change the output to columns where you have rows? Your output flows like this:<br />
Name<br />
PowerState<br />
vCenter<br />
Datacenter<br />
Cluster<br />
VMHost<br />
Datastore<br />
FolderName<br />
GuestOS<br />
NetworkName<br />
IPAddress<br />
MacAddress<br />
VMTools<br />
 For me it would be much better if each of those rows was a column.<br />
Thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Frank		</title>
		<link>https://thesysadminchannel.com/get-vminformation-using-powershell-and-powercli/#comment-445</link>

		<dc:creator><![CDATA[Frank]]></dc:creator>
		<pubDate>Tue, 26 Apr 2022 17:45:52 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1741#comment-445</guid>

					<description><![CDATA[What about the VM ID? Can you add that into the listing of data returned?]]></description>
			<content:encoded><![CDATA[<p>What about the VM ID? Can you add that into the listing of data returned?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
