The first command gets a network service by using the Get-SCNetworkService cmdlet, and then stores it in the $NetworkService variable.
The second command gets a fabric role for the service in $NetworkService by using the Get-SCFabricRole cmdlet, and then stores it in the $FabricRole variable.
The third command gets a virtual machine named VM01 by using the Get-SCVirtualMachine cmdlet, and then stores it in the $VirtualMachine variable.
The fourth command gets the run as account named ContosoAccount by using the Get-SCRunAsAccount cmdlet, and then stores it in the $RunAsAccount variable.
The fifth command creates a virtual LAN by using the New-SCSubnetVLan cmdlet, and then stores it in the $SubnetVlanIPv4 variable.
The final command adds the new fabric role resource to the fabric role in $FabricRole.
The command specifies the values created by previous commands in the example.
Parameters
-BackEndSwitchName
Specifies the name of a back-end switch.
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
-FabricRole
Specifies a fabric role.
Parameter properties
Type:
FabricRole
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-FrontEndSwitchName
Specifies the name of a front-end switch.
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
-IPv4Subnet
Specifies an IPv4 subnet.
Parameter properties
Type:
SubnetVLan
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
-IPv6Subnet
Specifies an IPv6 subnet.
Note
This parameter is applicable for VMM 2019 UR2.
Parameter properties
Type:
SubnetVLan
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
-JobVariable
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
-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
-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
-RunAsAccount
Specifies a Run As account that contains credentials with permission to perform this action.
Parameter properties
Type:
RunAsAccount
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
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
-ServiceInstance
Specifies a service object.
Parameter properties
Type:
Service
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ServiceResource
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VirtualMachine
Specifies a virtual machine object.
Parameter properties
Type:
VM
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
VMResource
Position:
Named
Mandatory:
True
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.