Set-SCFabricRoleResource

Modifies a fabric role resource.

Syntax

Set-SCFabricRoleResource [-FabricRoleResource] <FabricRoleResource> [-JobVariable <String>]
 [-NCBGPRouter <NCBGPRouter>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>]
 [-Recursive] [-RunAsAccount <RunAsAccount>] [-RunAsynchronously] [-VMMServer <ServerConnection>]
 [<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
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
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
-NCBGPRouter
Type:NCBGPRouter
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
-Recursive
Type:SwitchParameter
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:False
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
-VMMServer

Specifies a VMM server object.

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