Set-AzVMBginfoExtension
Adds the BGInfo extension to a virtual machine.
Syntax
Set-AzVMBginfoExtension
[-ResourceGroupName] <String>
[-VMName] <String>
-Name <String>
[-TypeHandlerVersion <String>]
[-Location <String>]
[-DisableAutoUpgradeMinorVersion]
[-ForceRerun <String>]
[-NoWait]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzVMBGInfoExtension cmdlet adds the BGInfo extension to a virtual machine.
Examples
Example 1: Add the BGInfo extension for a virtual machine
Set-AzVMBgInfoExtension -ResourceGroupName "ContosoRG" -VMName "ContosoVM" -Name "ExtensionName" -TypeHandlerVersion "2.1" -Location "West Europe"
This command adds the BGInfo extension to virtual machine named ContosoVM. The command specifies the resource group and location of the virtual machine. The command specifies the name and version of the extension.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
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 |
-DisableAutoUpgradeMinorVersion
Indicates that this cmdlet prevents the Azure guest agent from automatically updating the extension to a newer minor version. By default, this cmdlet enables the guest agent to update the extension.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ForceRerun
Specifies that the extension should be run again with the same public or protected settings. The value can be any string different from the current value. If forceUpdateTag is not changed, updates to public or protected settings are still applied by the handler.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Location
Specifies the location of the virtual machine.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the BGInfo extension that this cmdlet adds to a virtual machine.
Type: | String |
Aliases: | ExtensionName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NoWait
Starts the operation and returns immediately, before the operation is completed. In order to determine if the operation has successfully been completed, use some other mechanism.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of the resource group of the virtual machine to which this cmdlet adds an extension.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TypeHandlerVersion
Specifies the version of the extension that this cmdlet adds to the virtual machine.
Type: | String |
Aliases: | HandlerVersion, Version |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMName
Specifies the name of the virtual machine to which this cmdlet adds the BGInfo extension.
Type: | String |
Aliases: | ResourceName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Azure PowerShell