Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 183671

Table format

$
0
0

Hello,

 

I discover powershell and PowerCLI.

 

I search list the Upgrade Policy Tools of all VM.

 

This script work's fine :

 

$report = @()
Foreach ( $v in Get-vm ) {
$vm = Get-View $v
$vms = "" | Select-Object VMName, ToolsUpgradePolicy
$vms.VMName = $vm.Name
$vms.ToolsUpgradePolicy = $vm.Config.Tools.ToolsUpgradePolicy
$report += $vms
}
$report | Sort ToolsUpgradePolicy

 

But, the ToolsUpgradePolicy column is not display, only VMName column.

 

If i add " | ft -auto" in the end, it's ok

 

Why?

 

Thx for your answer


Viewing all articles
Browse latest Browse all 183671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>