Set-​Azure​VM​Sql​Server​Extension

Sets the Azure SQL Server extension on a virtual machine.

Syntax

Set-AzureVMSqlServerExtension
   [[-ReferenceName] <String>]
   [[-Version] <String>]
   [[-AutoPatchingSettings] <AutoPatchingSettings>]
   [[-AutoBackupSettings] <AutoBackupSettings>]
   [[-KeyVaultCredentialSettings] <KeyVaultCredentialSettings>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Profile <AzureSMProfile>]
   -VM <IPersistentVM>
   [<CommonParameters>]
Set-AzureVMSqlServerExtension
   [[-ReferenceName] <String>]
   [[-Version] <String>]
   [-Disable]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Profile <AzureSMProfile>]
   -VM <IPersistentVM>
   [<CommonParameters>]
Set-AzureVMSqlServerExtension
   [[-ReferenceName] <String>]
   [[-Version] <String>]
   [-Uninstall]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Profile <AzureSMProfile>]
   -VM <IPersistentVM>
   [<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.

Required Parameters

-VM

Specifies the persistent virtual machine object.

Type:IPersistentVM
Aliases:InputObject
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Optional Parameters

-AutoBackupSettings

Specifies the automatic SQL Server backup settings.

Type:AutoBackupSettings
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AutoPatchingSettings

Specifies the automatic SQL Server patching settings.

Type:AutoPatchingSettings
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Disable

Indicates that this cmdlet disables the extension state.

Type:SwitchParameter
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-KeyVaultCredentialSettings

Specifies key vault credential settings.

Type:KeyVaultCredentialSettings
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName)
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
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
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False