Set-AzureVMSqlServerExtension
Sets the Azure SQL Server extension on a virtual machine.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
Set-AzureVMSqlServerExtension
[[-ReferenceName] <String>]
[[-Version] <String>]
[[-AutoPatchingSettings] <AutoPatchingSettings>]
[[-AutoBackupSettings] <AutoBackupSettings>]
[[-KeyVaultCredentialSettings] <KeyVaultCredentialSettings>]
-VM <IPersistentVM>
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Set-AzureVMSqlServerExtension
[[-ReferenceName] <String>]
[[-Version] <String>]
[-Disable]
-VM <IPersistentVM>
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Set-AzureVMSqlServerExtension
[[-ReferenceName] <String>]
[[-Version] <String>]
[-Uninstall]
-VM <IPersistentVM>
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Description
The Set-AzureVMSqlServerExtension cmdlet sets the Azure SQL Server extension on a virtual machine.
Examples
Example 1: Set auto-patching settings on a virtual machine
PS C:\> Get-AzureVM -ServiceName "ServiceName" -Name "VMName" | Set-AzureVMSqlServerExtension -AutoPatchingSettings $APS | Update-AzureVM
This command sets auto-patching settings on an Azure virtual machine.
Example 2: Set auto-backup settings on a virtual machine
PS C:\> Get-AzureVM -ServiceName "ServiceName" -Name "VMName" | Set-AzureVMSqlServerExtension -AutoBackupSettings $ABS | Update-AzureVM
This command sets auto-backup settings on Azure virtual machine.
Example 3: Disable an SQL Server extension on a virtual machine
PS C:\> Get-AzureVM -ServiceName "Service" -Name "VMName" | Set-AzureVMSqlServerExtension -Disable
This command disables SQL Server virtual machine extension on a given virtual machine.
Example 4: Uninstall an SQL Server extension on a specific virtual machine
PS C:\> Get-AzureVM -ServiceName "Service" -Name "VMName" | Set-AzureVMSqlServerExtension -Uninstall
This command uninstalls a SQL Server virtual machine extension on the virtual machine named VMName.
Parameters
-AutoBackupSettings
Specifies the automatic SQL Server backup settings.
Type: | AutoBackupSettings |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AutoPatchingSettings
Specifies the automatic SQL Server patching settings.
Type: | AutoPatchingSettings |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Disable
Indicates that this cmdlet disables the extension state.
Type: | SwitchParameter |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InformationAction
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Type: | ActionPreference |
Aliases: | infa |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InformationVariable
Specifies an information variable.
Type: | String |
Aliases: | iv |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KeyVaultCredentialSettings
Specifies key vault credential settings.
Type: | KeyVaultCredentialSettings |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Profile
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReferenceName
Specifies the reference name of the SQL Server extension.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Uninstall
Indicates that this cmdlet uninstalls the SQL Server extension from the virtual machine.
Type: | SwitchParameter |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Version
Specifies the version of the SQL Server extension that Get-AzureVMSqlServerExtension retrieves settings from.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VM
Specifies the persistent virtual machine object.
Type: | IPersistentVM |
Aliases: | InputObject |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |