< Back

Get-VsphereObject

Sat Jan 18, 2020 9:38 am

NAME Get-VsphereObject



SYNOPSIS

Retrieves vSphere objects.





SYNTAX

Get-VsphereObject -ObjectType {Cluster | Compute Resource | Datacenter | Datastore | Folder | Host | Network |

Resource Pool | VM} [-Filters <PSObject[]>] [-VmId <String[]>] -Connection <Hashtable> [<CommonParameters>]



Get-VsphereObject -ObjectType {Cluster | Compute Resource | Datacenter | Datastore | Folder | Host | Network |

Resource Pool | VM} [-Filters <PSObject[]>] [-ClusterId <String[]>] -Connection <Hashtable> [<CommonParameters>]



Get-VsphereObject -ObjectType {Cluster | Compute Resource | Datacenter | Datastore | Folder | Host | Network |

Resource Pool | VM} [-Filters <PSObject[]>] [-ComputeResourceId <String[]>] [-ExcludeCluster <SwitchParameter>]

-Connection <Hashtable> [<CommonParameters>]



Get-VsphereObject -ObjectType {Cluster | Compute Resource | Datacenter | Datastore | Folder | Host | Network |

Resource Pool | VM} [-Filters <PSObject[]>] [-DatacenterId <String[]>] -Connection <Hashtable> [<CommonParameters>]



Get-VsphereObject -ObjectType {Cluster | Compute Resource | Datacenter | Datastore | Folder | Host | Network |

Resource Pool | VM} [-Filters <PSObject[]>] [-DatastoreId <String[]>] [-DatastoreComputeResourceId <String[]>]

-Connection <Hashtable> [<CommonParameters>]



Get-VsphereObject -ObjectType {Cluster | Compute Resource | Datacenter | Datastore | Folder | Host | Network |

Resource Pool | VM} [-Filters <PSObject[]>] [-FolderId <String[]>] -Connection <Hashtable> [<CommonParameters>]



Get-VsphereObject -ObjectType {Cluster | Compute Resource | Datacenter | Datastore | Folder | Host | Network |

Resource Pool | VM} [-Filters <PSObject[]>] [-HostId <String[]>] -Connection <Hashtable> [<CommonParameters>]



Get-VsphereObject -ObjectType {Cluster | Compute Resource | Datacenter | Datastore | Folder | Host | Network |

Resource Pool | VM} [-Filters <PSObject[]>] [-NetworkId <String[]>] -Connection <Hashtable> [<CommonParameters>]



Get-VsphereObject -ObjectType {Cluster | Compute Resource | Datacenter | Datastore | Folder | Host | Network |

Resource Pool | VM} [-Filters <PSObject[]>] [-ResourcePoolId <String[]>] [-ExcludeVirtualApp <SwitchParameter>]

-Connection <Hashtable> [<CommonParameters>]





DESCRIPTION

Retrieves vSphere objects. Supported vSphere object types: Cluster, Compute Resource, Datacenter, Datastore,

Folder, Host, Network, Resource Pool, VM.







PARAMETERS

-ObjectType <String>

Specifies the type of objects that are to be retrieved. Accepted values are:

Cluster

Compute Resource

Datacenter

Datastore

Folder

Host

Network

Resource Pool

VM



Required? true

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Filters [<PSObject[]>]

Specifies one or more filters. For example:

@([PSCustomObject]@{'Id'='Name';'Operator'='EqualTo';'Value'='VM-SqlServer'},[PSCustomObject]@{'Id'='Parent';'O

perator'='EqualTo';'Value'='Folder-group-v123'})





Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-VmId [<String[]>]

ID (managed object reference) for a specific VM to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Connection <Hashtable>

Specifies connection information to the vCenter server. For example:

@{ServerUrl='<vCenter Server URL>';User='<user>';Password='<password>';LicenseKey=<license

key>;SkipCertificateValidation=$false}



Required? true

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-ClusterId [<String[]>]

ID (managed object reference) for a specific cluster to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-ComputeResourceId [<String[]>]

ID (managed object reference) for a specific compute resource to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-ExcludeCluster [<SwitchParameter>]

Specifies that cluster objects are to be excluded, when retrieving compute resources.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-DatacenterId [<String[]>]

ID (managed object reference) for a specific datacenter to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-DatastoreId [<String[]>]

ID (managed object reference) for a specific datastore to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-DatastoreComputeResourceId [<String[]>]

ID (managed object reference) for a compute resource for which datastores are to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-FolderId [<String[]>]

ID (managed object reference) for a specific folder to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-HostId [<String[]>]

ID (managed object reference) for a specific host to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-NetworkId [<String[]>]

ID (managed object reference) for a specific network object to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-ResourcePoolId [<String[]>]

ID (managed object reference) for a specific resource pool to be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-ExcludeVirtualApp [<SwitchParameter>]

Specifies that Virtual App objects are to be excluded when retrieving resource pools.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None







OUTPUTS

System.Management.Automation.PSObject

The list of outputs returned by the cmdlet varies based on the specified Object Type. Refer to the Integration

Module User Guide for details on each set of outputs.









RELATED LINKS