VCenterGetMachines Method (String, String, String, Boolean, Boolean, ListNetwork) |
Read vSphere dates and sets inventory lists. Gives a list of VMs
Namespace:
VMInfoFace
Assembly:
VMInfoFace (in VMInfoFace.dll) Version: 21.5.28.1 (21.5.28.1171)
Syntaxpublic static List<Machine> GetMachines(
string pServer,
string pUserName,
string pPassword,
bool pSummary,
bool pStorageProfile,
List<Network> pNetworks = null
)
Public Shared Function GetMachines (
pServer As String,
pUserName As String,
pPassword As String,
pSummary As Boolean,
pStorageProfile As Boolean,
Optional pNetworks As List(Of Network) = Nothing
) As List(Of Machine)
Parameters
- pServer
- Type: SystemString
Hostname or IP address vCenter Server - pUserName
- Type: SystemString
Username to login to vCenter Server - pPassword
- Type: SystemString
Password to login to vCenter Server - pSummary
- Type: SystemBoolean
Read summary - pStorageProfile
- Type: SystemBoolean
Read storage profile - pNetworks (Optional)
- Type: System.Collections.GenericListNetwork
Network configuration list for bandwidth
Return Value
Type:
ListMachineList of machine names
Remarks
Examples
This example read VM machine include field Details as summary of all properties and without network configuration so no sets NetworkBandwidth
VMInfoFace.VCenter.GetMachines(vSphereServer, UserName, Password, true);
List<VMInfoFace.Data.Machine> Machines = VMInfoFace.VCenter.Machines;
List<VMInfoFace.Data.Datacenter> Datacenters = VMInfoFace.VCenter.Datacenters;
List<VMInfoFace.Data.Folder> Folders = VMInfoFace.VCenter.Folders;
See Also