Condividi tramite


Get-SCVMSubnet

Get-SCVMSubnet

Gets a virtual machine subnet.

Syntax

Parameter Set: All
Get-SCVMSubnet [[-Name] <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-Subnet <String> ] [-Unassigned] [-VMMServer <ServerConnection> ] [-VMNetwork <VMNetwork> ] [ <CommonParameters>]

Detailed Description

The Get-SCVMSubnet cmdlet gets a virtual machine subnet object.

Parameters

-Name<String>

Specifies the name of a VMM object.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUser<System.String>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Subnet<String>

Specifies an IP subnet (IPv4 or IPv6) in Classless Inter-Domain Routing (CIDR) notation.

Example format for an IPv4 subnet: 192.168.0.1/24

Example format for an IPv6 subnet: FD4A:29CD:184F:3A2C::/64

NOTE: An IP subnet cannot overlap with any other subnet in a host group or child host groups.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Unassigned

Indicates that this cmdlet retrieves IP addresses or MAC addresses that have been allocated from an address pool but not assigned to a resource.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMNetwork<VMNetwork>

Specifies a VM network object.

To get a VM network object, use the Get-SCVMNetwork cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Get a VM subnet by its name

This command gets the virtual machine subnet object named VMSubnet01, and then stores the object in the $VMSubnet variable.

PS C:\> $VMSubNet = Get-SCVMSubnet -Name "VMSubnet01"

Get-SCVMNetwork

New-SCVMSubnet

Remove-SCVMSubnet

Set-SCVMSubnet