Share via


Set-SCFabricRoleResource

Modifies a fabric role resource.

Syntax

Default (Default)

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.

Parameter properties

Type:FabricRoleResource
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
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

-NCBGPRouter

The Set-SCFabricRoleResource cmdlet modifies a fabric role resource.

Parameter properties

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

-Recursive

The Set-SCFabricRoleResource cmdlet modifies a fabric role resource.

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

-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:False
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

-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.