Set-SCFabricRoleResource

Modifies a fabric role resource.

Syntax

Set-SCFabricRoleResource
   [-VMMServer <ServerConnection>]
   [-FabricRoleResource] <FabricRoleResource>
   [-RunAsAccount <RunAsAccount>]
   [-NCBGPRouter <NCBGPRouter>]
   [-Recursive]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]

Description

The Set-SCFabricRoleResource cmdlet modifies a fabric role resource.

Examples

Example 1: Set the configuration of fabric resources

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:\> $VmFabricRoleResource = $FabricRole.ServiceVMs | where { $_.Resource -eq $VirtualMachine }
PS C:\> $BgpPeers = @()
PS C:\> $BgpPeers += New-SCNCBGPPeer -RouterName "BGPPEER" -RouterIPAddress "10.20.30.40" -RouterAsn 60
PS C:\> $BgpRouter = New-SCNCBGPRouter -LocalASN 30 -RouterPeers $BgpPeers
PS C:\> Set-SCFabricRoleResource -FabricRoleResource $VmFabricRoleResource -NCBGPRouter $BgpRouter

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 a specified service, and stores that resource in the $ServiceFabricRoleResource variable.

The fifth command creates an array variable named $BgpPeers.

The sixth command creates a peer by using the New-SCNCBGPPeer cmdlet, and then adds it to $BgpPeers.

The seventh command creates a router object by using the New-SCNCBGPRouter cmdlet based on the value of $BgpPeers. The command stores the result in the $BgpRouter variable.

The final command updates the settings based on $BgpRouter the specified fabric resource.

Parameters

-FabricRoleResource

Specifies the fabric role resource to modify.

Type:FabricRoleResource
Position:0
Default value:None
Required:True
Accept pipeline input:True
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

-NCBGPRouter

Type:NCBGPRouter
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

-Recursive

Type:SwitchParameter
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: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

-VMMServer

Specifies a VMM server object.

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