Editar

Partilhar via


Add-AzServiceFabricManagedNodeTypeVMExtension

Add vm extension to the node type.

Syntax

Add-AzServiceFabricManagedNodeTypeVMExtension
   [-InputObject] <PSManagedNodeType>
   -Name <String>
   [-ForceUpdateTag <String>]
   -Publisher <String>
   -Type <String>
   -TypeHandlerVersion <String>
   [-AutoUpgradeMinorVersion]
   [-Setting <Object>]
   [-ProtectedSetting <Object>]
   [-ProvisionAfterExtension <String[]>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-AzServiceFabricManagedNodeTypeVMExtension
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-NodeTypeName] <String>
   -Name <String>
   [-ForceUpdateTag <String>]
   -Publisher <String>
   -Type <String>
   -TypeHandlerVersion <String>
   [-AutoUpgradeMinorVersion]
   [-Setting <Object>]
   [-ProtectedSetting <Object>]
   [-ProvisionAfterExtension <String[]>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Add vm extension to the node type. This will add the extension to the underliying Virtual Machine Scale Set resource.

Examples

Example 1

$rgName = "testRG"
$clusterName = "testCluster"
Add-AzServiceFabricManagedNodeTypeVMExtension -ResourceGroupName $rgName -ClusterName $clusterName -NodeTypeName $NodeTypeName -Name $ExtName -Publisher $Publisher -Type $ExtType -TypeHandlerVersion $ExtVer -AutoUpgradeMinorVersion -Verbose

This command adds an extension to the node type.

Example 2

$rgName = "testRG"
$clusterName = "testCluster"
$NodeTypeName = "nt1"
$settings = @{ "secretsManagementSettings" = @{ "pollingIntervalInS" = "3600"; "certificateStoreName" = "MY"; "certificateStoreLocation" = "LocalMachine"; "observedCertificates" = @( "https:/testkv.vault.azure.net/secrets/TestSecret" ) } };
$protectedSettings = @{"testProgectedSetting" = $protectedSetting };
Add-AzServiceFabricManagedNodeTypeVMExtension -ResourceGroupName $rgName -ClusterName $clusterName -NodeTypeName $NodeTypeName -Name KeyVaultForWindows -Publisher Microsoft.Azure.KeyVault -Type KeyVaultForWindows -TypeHandlerVersion 1.0 -Setting $settings -ProtectedSetting $protectedSettings  -AutoUpgradeMinorVersion -Verbose

This command adds an extension with settings and protected settings to the node type.

Example 3

$rgName = "testRG"
$clusterName = "testCluster"
$NodeTypeName = "nt1"
$nodeType = Get-AzServiceFabricManagedNodeType -ResourceGroupName $rgName -ClusterName $clusterName -Name $NodeTypeName

$nodeType | Add-AzServiceFabricManagedNodeTypeVMExtension $ExtName -Publisher $Publisher -Type $ExtType -TypeHandlerVersion $ExtVer -AutoUpgradeMinorVersion -Verbose

This command adds an extension to the node type, with piping.

Parameters

-AsJob

Run cmdlet in the background and return a Job to track progress.

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

-AutoUpgradeMinorVersion

Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.

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

-ClusterName

Specify the name of the cluster.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForceUpdateTag

If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.

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

-InputObject

Node Type resource

Type:PSManagedNodeType
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

extension name.

Type:String
Aliases:ExtensionName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NodeTypeName

Specify the name of the node type.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ProtectedSetting

The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.

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

-ProvisionAfterExtension

Collection of extension names after which this extension needs to be provisioned.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Publisher

The name of the extension handler publisher. This can use the Get-AzVMImagePublisher cmdlet to get the publisher.

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

-ResourceGroupName

Specify the name of the resource group.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Setting

Json formatted public settings for the extension.

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

-Type

Specifies the type of the extension; an example is "CustomScriptExtension". You can use the Get-AzVMExtensionImageType cmdlet to get the extension type.

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

-TypeHandlerVersion

Specifies the version of the script handler.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

PSManagedNodeType

Outputs

PSManagedNodeType