< Back
Get-VDSwitch
Post
NAME Get-VDSwitch
SYNOPSIS
This cmdlet retrieves vSphere distributed switches.
SYNTAX
Get-VDSwitch -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDSwitch [[-Name] <String[]>] [-Location <FolderContainer[]>] [-Server <VIServer[]>] [-Tag <Tag[]>] [-VM
<VirtualMachine[]>] [-VMHost <VMHost[]>] [<CommonParameters>]
Get-VDSwitch -RelatedObject <VDSwitchRelatedObjectBase[]> [<CommonParameters>]
DESCRIPTION
This cmdlet retrieves vSphere distributed switches.
PARAMETERS
-Id <String[]>
Specifies the IDs of the vSphere distributed switches that you want to retrieve.
Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that
matches exactly one of the string values in that list.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Location <FolderContainer[]>
Specifies vCenter Server container objects that you want to search for vSphere distributed switches. This
parameter accepts Datacenter and Folder objects.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Name <String[]>
Specifies the names of the vSphere distributed switches that you want to retrieve.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-RelatedObject <VDSwitchRelatedObjectBase[]>
Specifies an object to retrieve one or more vSphere distributed switches that are related to the object. This
parameter accepts NetworkPool and OMResource objects.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Server <VIServer[]>
Specify the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the
command runs on the default servers. For more information about default servers, see the description of
Connect-CIServer.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Tag <Tag[]>
Returns only the vSphere distributed switches that are associated with any of the specified tags.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-VM <VirtualMachine[]>
Specifies virtual machines to retrieve vSphere distributed switches they are connected to.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-VMHost <VMHost[]>
Specifies hosts to retrieve vSphere distributed switches to which the hosts are added.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
<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
OUTPUTS
Zero or more VDSwitch objects
NOTES
-------------------------- Example 1 --------------------------
Get-Datacenter -Name MyDatacenter | Get-VDSwitch
Retrieves all vSphere distributed switches in the specified datacenter.
-------------------------- Example 2 --------------------------
Get-VMHost -Name MyVMHost | Get-VDSwitch
Retrieves all vSphere distributed switches to which the specified host is added.
-------------------------- Example 3 --------------------------
Get-VM -Name MyVM | Get-VDSwitch
Retrieves all vSphere distributed switches to which the specified virtual machine is connected.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... witch.html
Remove-VDSwitch
New-VDSwitch
Set-VDSwitch
Export-VDSwitch
SYNOPSIS
This cmdlet retrieves vSphere distributed switches.
SYNTAX
Get-VDSwitch -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDSwitch [[-Name] <String[]>] [-Location <FolderContainer[]>] [-Server <VIServer[]>] [-Tag <Tag[]>] [-VM
<VirtualMachine[]>] [-VMHost <VMHost[]>] [<CommonParameters>]
Get-VDSwitch -RelatedObject <VDSwitchRelatedObjectBase[]> [<CommonParameters>]
DESCRIPTION
This cmdlet retrieves vSphere distributed switches.
PARAMETERS
-Id <String[]>
Specifies the IDs of the vSphere distributed switches that you want to retrieve.
Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that
matches exactly one of the string values in that list.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Location <FolderContainer[]>
Specifies vCenter Server container objects that you want to search for vSphere distributed switches. This
parameter accepts Datacenter and Folder objects.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Name <String[]>
Specifies the names of the vSphere distributed switches that you want to retrieve.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-RelatedObject <VDSwitchRelatedObjectBase[]>
Specifies an object to retrieve one or more vSphere distributed switches that are related to the object. This
parameter accepts NetworkPool and OMResource objects.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Server <VIServer[]>
Specify the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the
command runs on the default servers. For more information about default servers, see the description of
Connect-CIServer.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Tag <Tag[]>
Returns only the vSphere distributed switches that are associated with any of the specified tags.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-VM <VirtualMachine[]>
Specifies virtual machines to retrieve vSphere distributed switches they are connected to.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-VMHost <VMHost[]>
Specifies hosts to retrieve vSphere distributed switches to which the hosts are added.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
<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
OUTPUTS
Zero or more VDSwitch objects
NOTES
-------------------------- Example 1 --------------------------
Get-Datacenter -Name MyDatacenter | Get-VDSwitch
Retrieves all vSphere distributed switches in the specified datacenter.
-------------------------- Example 2 --------------------------
Get-VMHost -Name MyVMHost | Get-VDSwitch
Retrieves all vSphere distributed switches to which the specified host is added.
-------------------------- Example 3 --------------------------
Get-VM -Name MyVM | Get-VDSwitch
Retrieves all vSphere distributed switches to which the specified virtual machine is connected.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... witch.html
Remove-VDSwitch
New-VDSwitch
Set-VDSwitch
Export-VDSwitch