API Reference
Command
Get-CxHyperVSwitch
Gets native Hyper-V virtual switch inventory through the Hyper-V WMI v2 provider.
Examples
Example 1: Retrieves virtual switches visible on the local Hyper-V host.
PS>
Get-CxHyperVSwitch
Example 2: Queries selected virtual switches on a remote Hyper-V host.
PS>
Get-CxHyperVSwitch -ComputerName HV01 -Name 'External*'
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Get-CxHyperVSwitch [-ComputerName <string[]>] [-Name <string[]>] [-TimeoutSeconds <int>] [<CommonParameters>]#Parameters
- ComputerName string[]
- Target computer names. Use . for the local machine or provide DNS/NetBIOS names. When omitted, the local computer is queried.
- Name string[]
- Optional wildcard patterns matched against virtual switch name or WMI identity.
- TimeoutSeconds int
- Optional WMI timeout in seconds.
Outputs
ComputerX.HyperV.HyperVSwitchInfo