The first command gets the virtual machine object named VM01 and stores the object in the $VM variable.
The second command gets the virtual network adapter objects for virtual machine VM01 and stores the objects in the $vNICs variable.
The third command gets the static IP address pool object named Production IP Address Pool and stores the object in the $IPPool variable.
The last command allocates an IP address from the static IP address pool stored in $IPPool to the first virtual network adapter stored in $vNICs, and supplies VM01 as the description for the allocated IP address.
Parameters
-Description
Specifies a description for the object.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DisableReconcile
The Grant-SCIPAddress cmdlet allocates static IP and virtual IP addresses from a specified address pool.
To grant a specific IP address, use the IPAddress parameter.
Otherwise, Virtual Machine Manager (VMM) chooses the IP address from the address pool.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ExplicitRevokeRequired
The Grant-SCIPAddress cmdlet allocates static IP and virtual IP addresses from a specified address pool.
To grant a specific IP address, use the IPAddress parameter.
Otherwise, Virtual Machine Manager (VMM) chooses the IP address from the address pool.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-GrantToObjectID
Specifies the ID of an object to which an allocated IP address or MAC address is assigned.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Default
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-GrantToObjectType
Specifies a value for AllocatedToObjectType to which an allocated IP address or virtual IP address is assigned.
The acceptable values for this parameter are:
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NetworkController
Specifies a network controller.
Parameter properties
Type:
VirtualSwitchExtensionManager
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
PublicIPAddress
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-OnBehalfOfUser
Specifies a user name.
This cmdlet operates on behalf of the user that this parameter specifies.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
UserRole
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Owner
Specifies the owner of a VMM object in the form of a valid domain user account.
Example format: -Owner "Contoso\PattiFuller"
Example format: -Owner "PattiFuller@Contoso"
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
PublicIPAddress
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PublicIPAddress
The Grant-SCIPAddress cmdlet allocates static IP and virtual IP addresses from a specified address pool.
To grant a specific IP address, use the IPAddress parameter.
Otherwise, Virtual Machine Manager (VMM) chooses the IP address from the address pool.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
PublicIPAddress
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-StaticIPAddressPool
Specifies an IP address pool from which you can assign static IP addresses.
Parameter properties
Type:
StaticIPAddressPool
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Default
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-UserRole
The Grant-SCIPAddress cmdlet allocates static IP and virtual IP addresses from a specified address pool.
To grant a specific IP address, use the IPAddress parameter.
Otherwise, Virtual Machine Manager (VMM) chooses the IP address from the address pool.
Parameter properties
Type:
UserRole
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
PublicIPAddress
Position:
Named
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.
Outputs
CloudDRPairingInfoData
This cmdlet returns a CloudDRPairingInfoData object.
Notes
This cmdlet requires a VMM static IP address pool object, which can be retrieved using the Get-SCStaticIPAddressPool cmdlet.