Add-SCFabricRoleResource
Adds a fabric role resource.
Syntax
Add-SCFabricRoleResource
[-VMMServer <ServerConnection>]
[-FabricRole] <FabricRole>
-VirtualMachine <VM>
-RunAsAccount <RunAsAccount>
[-IPv4Subnet \<SubnetVLan\>]
[-BackEndSwitchName <String>]
[-FrontEndSwitchName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Add-SCFabricRoleResource
[-VMMServer <ServerConnection>]
[-FabricRole] <FabricRole>
-ServiceInstance <Service>
-RunAsAccount <RunAsAccount>
[-IPv4Subnet \<SubnetVLan\>]
[-BackEndSwitchName <String>]
[-FrontEndSwitchName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Description
Note
A new parameter [-IPv6Subnet <SubnetVLan>] is included in VMM 2019 UR2 and later. For more information, see Parameters.
The Add-SCFabricRoleResource cmdlet adds a fabric role resource.
Examples
Example 1: Add fabric role resource to a fabric role
PS C:\> $NetworkService = Get-SCNetworkService -Name "ns"
PS C:\> $FabricRole = Get-SCFabricRole -NetworkService $NetworkService -Name "fr"
PS C:\> $VirtualMachine = Get-SCVirtualMachine -Name "VM01"
PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "ContosoAccount"
PS C:\> $SubnetVlanIPv4 = New-SCSubnetVLan -Subnet "10.185.108.0/23" -VLanID "564"
PS C:\> Add-SCFabricRoleResource -FabricRole $FabricRole -VirtualMachine $VirtualMachine -IPv4Subnet $SubnetVlanIPv4 -RunAsAccount $RunAsAccount"
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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FabricRole
Specifies a fabric role.
Type: | FabricRole |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontEndSwitchName
Specifies the name of a front-end switch.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv4Subnet
Specifies an IPv4 subnet.
Type: | SubnetVLan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv6Subnet
Specifies an IPv6 subnet.
Note
This parameter is applicable for VMM 2019 UR2 and later.
Type: | SubnetVLan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Type: | String |
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 |
-RunAsAccount
Specifies a Run As account that contains credentials with permission to perform this action.
Type: | RunAsAccount |
Position: | Named |
Default value: | None |
Required: | True |
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 |
-ServiceInstance
Specifies a service object.
Type: | Service |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualMachine
Specifies a virtual machine object.
Type: | VM |
Position: | Named |
Default value: | None |
Required: | True |
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 |