VCenterGetMachines Method (String, String, String, Boolean, Boolean, String) |
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,
string pNetworkConfigurationFile = ""
)
Public Shared Function GetMachines (
pServer As String,
pUserName As String,
pPassword As String,
pSummary As Boolean,
pStorageProfile As Boolean,
Optional pNetworkConfigurationFile As String = ""
) 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 - pNetworkConfigurationFile (Optional)
- Type: SystemString
Network configuration file 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 include field NetworkBandwidth
VMInfoFace.VCenter.GetMachines(vSphereServer, UserName, Password, true, NetworkConfigFile);
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