Partilhar via


Get-SCLogicalSwitch

Gets a logical switch.

Syntax

All (Default)

Get-SCLogicalSwitch
    [[-Name] <String>]
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

ById

Get-SCLogicalSwitch
    [[-Name] <String>]
    [-VMMServer <ServerConnection>]
    [-ID <Guid>]
    [<CommonParameters>]

Description

The Get-SCLogicalSwitch cmdlet gets a logical switch object.

Examples

Example 1: Get a logical switch by its name

PS C:\> $LogicalSwitch = Get-SCLogicalSwitch -Name "LogicalSwitch01"

This command gets the logical swtich named LogicalSwitch01 and stores it in the $LogicalSwitch variable.

Parameters

-ID

Specifies the numerical identifier as a globally unique identifier, or GUID, for a specific object.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ById
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of a Virtual Machine Manager (VMM) object.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.