We are running vSphere 7.0, one before the latest version.
Get-View -ViewType VirtualMachine
the command above works fine, and I got a long list of outputs. please see below as just one of a lots.
How would I know if I have a vm without harddisks? There are more than 2000 VM's here.
...
Capability : VMware.Vim.VirtualMachineCapability
Config : VMware.Vim.VirtualMachineConfigInfo
Layout : VMware.Vim.VirtualMachineFileLayout
LayoutEx : VMware.Vim.VirtualMachineFileLayoutEx
Storage : VMware.Vim.VirtualMachineStorageInfo
EnvironmentBrowser : EnvironmentBrowser-envbrowser-2083
ResourcePool : VirtualApp-resgroup-v2646
ParentVApp : VirtualApp-resgroup-v2646
ResourceConfig : VMware.Vim.ResourceConfigSpec
Runtime : VMware.Vim.VirtualMachineRuntimeInfo
Guest : VMware.Vim.GuestInfo
Summary : VMware.Vim.VirtualMachineSummary
Datastore : {Datastore-datastore-180}
Network : {DistributedVirtualPortgroup-dvportgroup-35}
Snapshot :
RootSnapshot : {}
GuestHeartbeatStatus : gray
LinkedView :
Parent :
CustomValue : {101}
OverallStatus : green
ConfigStatus : green
ConfigIssue : {}
EffectiveRole : {-1}
Permission : {}
Name : vmname.abc.com
DisabledMethod : {MakePrimaryVM_Task, TerminateFaultTolerantVM_Task, ResetVM_Task, UnmountToolsInstaller...}
RecentTask : {}
DeclaredAlarmState : {alarm-10.vm-2083, alarm-1002.vm-2083, alarm-11.vm-2083, alarm-1703.vm-2083...}
TriggeredAlarmState : {}
AlarmActionsEnabled : True
Tag : {}
Value : {101}
AvailableField : {Application/System, Availability, Compute, FA.GosAgent...}
MoRef : VirtualMachine-vm-2083
Client : VMware.Vim.VimClientImpl
....
Thank you!