Hi,
I've got a beginners question since I just dived into the PowerCli world
Whenever I give a "get-vm -name " I get a result that displays me the: Name, PowerState, Num CPU and memory.
No I've created a very simple script:
param ( $VMHost, $VMName )
Connect-VIServer $VMHost
Get-VM -name $VMName
Whenever this is executed: ./script.ps1 it gives me far more information about that specific VM.
Am I overlooking something since IMHO the "get-vm" sentences are identical.
Thanks for clearing this out to me!
Kenneth
That's caused by the PS1XML file in the PowerCLI directory, called VMware.VimAutomation.Format.ps1xml.
This XML file contains the definitions how specific objects are displayed on the console.
When you execute the script other formatting rules come into play.
Rest assured the data is there.
You can add a Select-Object or Format-List cmdlet to see all the available properties.
Something like this
Get-Vm -Name <name> | Select *
or
Get-Vm -Name <name> | fl
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That's caused by the PS1XML file in the PowerCLI directory, called VMware.VimAutomation.Format.ps1xml.
This XML file contains the definitions how specific objects are displayed on the console.
When you execute the script other formatting rules come into play.
Rest assured the data is there.
You can add a Select-Object or Format-List cmdlet to see all the available properties.
Something like this
Get-Vm -Name <name> | Select *
or
Get-Vm -Name <name> | fl
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Aaah... yeah I was aware of the select-object command but found it strange that the output varied.
Thanks for making me feel "the real beginner" haha!
Thanks!