I use get-member quite often and am pleased with the details it provides, but I'm interested in a way to expose deeper details about the underlying methods/properties. For example, with this command I see methods and properties for "get-vm". What's the easiest way to locate detailed information about the properties below? I've found sites like this that help (http://www.jarvana.com/jarvana/view/net/java/dev/vcc/thirdparty/vi-api/4.0.0-2/vi-api-4.0.0-2-javado...), but it gets messy when trying to locate certain properties. I've tried commands like this (get-vm | get-member cddrives), but it doesn't show deeper info.
[vSphere PowerCLI] S:\SCRIPTS\READ ONLY SCRIPTS\MAC Addess Compare> get-vm | get-member
TypeName: VMware.VimAutomation.Client20.VirtualMachineImpl
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
CDDrives Property VMware.VimAutomation.Types.CDDrive[] CDDrives {get;}
CustomFields Property System.Collections.Generic.IDictionary`2[[System.String, mscorlib, Version=2.0.0.0, C...
DatastoreIdList Property System.String[] DatastoreIdList {get;}
Description Property System.String Description {get;}
DrsAutomationLevel Property System.Nullable`1[[VMware.VimAutomation.Types.DrsAutomationLevel, VMware.VimAutomatio...
FloppyDrives Property VMware.VimAutomation.Types.FloppyDrive[] FloppyDrives {get;}
FolderId Property System.String FolderId {get;}
Guest Property VMware.VimAutomation.Types.VMGuest Guest {get;}
HAIsolationResponse Property System.Nullable`1[[VMware.VimAutomation.Types.HAIsolationResponse, VMware.VimAutomati...
HardDisks Property VMware.VimAutomation.Types.HardDisk[] HardDisks {get;}
HARestartPriority Property System.Nullable`1[[VMware.VimAutomation.Types.HARestartPriority, VMware.VimAutomation...
Host Property VMware.VimAutomation.Types.VMHost Host {get;}
HostId Property System.String HostId {get;}
Id Property System.String Id {get;}
MemoryMB Property System.Int32 MemoryMB {get;}
Name Property System.String Name {get;}
NetworkAdapters Property VMware.VimAutomation.Types.NetworkAdapter[] NetworkAdapters {get;}
Notes Property System.String Notes {get;}
NumCpu Property System.Int32 NumCpu {get;}
PowerState Property VMware.VimAutomation.Types.PowerState PowerState {get;}
ResourcePoolId Property System.String ResourcePoolId {get;}
UsbDevices Property VMware.VimAutomation.Types.UsbDevice[] UsbDevices {get;}
VMHostId Property System.String VMHostId {get;}
VMSwapfilePolicy Property System.Nullable`1[[VMware.VimAutomation.Types.VMSwapfilePolicy, VMware.VimAutomation....
You can write a script that descends through the object and does a Get-Member at every level.
There are some such scripts floating around to do that.
Something I use quite often is this
$vm = Get-VM MyVM
Format-Custom -Depth 3 -InputObject $vm
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can write a script that descends through the object and does a Get-Member at every level.
There are some such scripts floating around to do that.
Something I use quite often is this
$vm = Get-VM MyVM
Format-Custom -Depth 3 -InputObject $vm
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference