Partager via


New-SCStaticIPAddressPool

Creates a static IP address pool.

Syntax

New-SCStaticIPAddressPool
   [-VMMServer <ServerConnection>]
   -Name <String>
   [-Description <String>]
   -Subnet <String>
   [-Vlan <Int32>]
   [-VIPAddressSet <String>]
   [-IPAddressRangeStart <String>]
   [-IPAddressRangeEnd <String>]
   [-IPAddressReservedSet <String>]
   [-DNSSuffix <String>]
   [-EnableNetBIOS <Boolean>]
   -LogicalNetworkDefinition <LogicalNetworkDefinition>
   [-DNSServer <String[]>]
   [-WINSServer <String[]>]
   [-DNSSearchSuffix <String[]>]
   [-PxeServerAddress <String[]>]
   [-DefaultGateway <DefaultGateway[]>]
   [-NetworkRoute <SubnetNetworkRoute[]>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCStaticIPAddressPool
   [-VMMServer <ServerConnection>]
   -Name <String>
   [-Description <String>]
   -Subnet <String>
   [-VIPAddressSet <String>]
   [-IPAddressRangeStart <String>]
   [-IPAddressRangeEnd <String>]
   [-IPAddressReservedSet <String>]
   [-DNSSuffix <String>]
   [-EnableNetBIOS <Boolean>]
   -VMSubnet <VMSubnet>
   [-DNSServer <String[]>]
   [-WINSServer <String[]>]
   [-DNSSearchSuffix <String[]>]
   [-PxeServerAddress <String[]>]
   [-DefaultGateway <DefaultGateway[]>]
   [-NetworkRoute <SubnetNetworkRoute[]>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCStaticIPAddressPool
   [-VMMServer <ServerConnection>]
   -Name <String>
   [-Description <String>]
   -Subnet <String>
   [-IsMulticast]
   [-IPAddressRangeStart <String>]
   [-IPAddressRangeEnd <String>]
   [-IPAddressReservedSet <String>]
   -LogicalNetworkDefinition <LogicalNetworkDefinition>
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]

Description

The New-SCStaticIPAddressPool cmdlet creates a Virtual Machine Manager (VMM) static IP address pool. A static IP address pool can be associated with one or more host groups.

Examples

Example 1: Create a static IP address pool

PS C:\> $HostGroup = Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup02\Production" }
PS C:\> $LogNet = Get-SCLogicalNetwork -Name "LogicalNetwork01"
PS C:\> $LogNetDef = Get-SCLogicalNetworkDefinition -VMHostGroup $HostGroup -LogicalNetwork $LogNet -Name "Logical Network Definition 01"
PS C:\> $DefaultGateway = New-SCDefaultGateway -IPAddress "10.0.0.1" -Metric 10
PS C:\> New-SCStaticIPAddressPool -LogicalNetworkDefinition $LogNetDef -Name "Production IP Address Pool" -Description "This IP address pool is used for LOB Apps in production" -Subnet "10.0.0.0/24" -IPAddressRangeStart "10.0.0.10" -IPAddressRangeEnd "10.0.0.99" -IPAddressReservedSet "10.0.0.25-10.0.0.35, 10.0.0.38" -VIPAddressSet "10.0.0.95-10.0.0.99" -DNSSuffix "domain.contoso.com" -DNSSearchSuffix domain1.contoso.com, domain2.contoso.com -DNSServer "10.0.0.1", "10.0.0.2" -WINSServer "10.0.0.1", "10.0.0.2" -DefaultGateway $DefaultGateway -EnableNetBIOS $True

The first command gets the host group that has the path All Hosts\HostGroup02\Production, and then stores that group it in the $HostGroup variable.

The second command gets the logical network named LogicalNetwork01, and stores that network in the $LogNet variable.

The third command gets the logical network definition named Logical Network Definition 01 for the host group stored in the $HostGroup variable.

The fourth command creates a default gateway, and then stores it in the $DefaultGateway variable.

The last command creates a static IP address pool that has the specified values.

Parameters

-DefaultGateway

Specifies an array of default gateway objects.

Type:DefaultGateway[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies a description for the address pool.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DNSSearchSuffix

Specifies an array of strings that are appended to a host name to resolve a DNS address.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DNSServer

Specifies an array of IP addresses of DNS servers. Valid formats are: IPv4 and IPv6 addresses.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DNSSuffix

Specifies the default DNS suffix associated with an adapter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableNetBIOS

Indicates whether to enable NetBIOS over TCP/IP for an adapter.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPAddressRangeEnd

Specifies the last IP address in a range of IP addresses. Use with the IPAddressRangeStart parameter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPAddressRangeStart

Specifies the first IP address in a range of IP addresses. Use with the IPAddressRangeEnd parameter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPAddressReservedSet

Specifies a set of IP addresses in an IP subnet that is reserved for other use.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IsMulticast

Indicates that the IP address is a multicast address or that the IP address pool contains a multicast IP address range.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies a variable in which job progress is tracked and stored.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LogicalNetworkDefinition

Specifies a logical network definition that contains the subnet that the IP address pool serves as specified by the Subnet parameter. A logical network definition is also referred to as a network site.

Type:LogicalNetworkDefinition
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name for the address pool.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NetworkRoute

Specifies an array of network routes.

Type:SubnetNetworkRoute[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

Type:UserRole
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PxeServerAddress

Specifies a list of PXE Server IP Addresses.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Subnet

Specifies an IP subnet in Classless Inter-Domain Routing (CIDR) notation. You can specify either IPv4 or IPv6 addresses.

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VIPAddressSet

Specifies a set of IP addresses in an IP subnet that is reserved for configuring virtual IPs (VIPs) in load balancers.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Vlan

Specifies a virtual local area network (VLAN).

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VMSubnet

Specifies a virtual machine subnet.

To obtain a VMSubnet object, use the Get-SCVMSubnet cmdlet.

Type:VMSubnet
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WINSServer

Specifies an array of IP addresses of Windows Internet Name Service (WINS) servers. Valid formats are: IPv4 and IPv6 addresses.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False