Add-SCFabricRoleResource

Adds a fabric role resource.

Syntax

Add-SCFabricRoleResource [-FabricRole] <FabricRole> [-BackEndSwitchName <String>]
 [-FrontEndSwitchName <String>] [-IPv4Subnet <SubnetVLan>] [-JobVariable <String>] [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] -RunAsAccount <RunAsAccount> [-RunAsynchronously]
 -ServiceInstance <Service> [-VMMServer <ServerConnection>] [<CommonParameters>]
Add-SCFabricRoleResource [-FabricRole] <FabricRole> [-BackEndSwitchName <String>]
 [-FrontEndSwitchName <String>] [-IPv4Subnet <SubnetVLan>] [-JobVariable <String>] [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] -RunAsAccount <RunAsAccount> [-RunAsynchronously]
 [-VMMServer <ServerConnection>] -VirtualMachine <VM> [<CommonParameters>]

Description

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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FabricRole

Specifies a fabric role.

Type:FabricRole
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FrontEndSwitchName

Specifies the name of a front-end switch.

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

Specifies an IPv4 subnet.

Type:SubnetVLan
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
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
Required:True
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServiceInstance

Specifies a service object.

Type:Service
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VirtualMachine

Specifies a virtual machine object.

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