< Back

Set-AzureVMSqlServerExtension

Wed Jan 30, 2019 5:54 pm

NAME Set-AzureVMSqlServerExtension



SYNOPSIS

Sets the Azure SQL Server extension on a virtual machine.





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.





PARAMETERS

-ReferenceName <String>

Specifies the reference name of the SQL Server extension.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Version <String>

Specifies the version of the SQL Server extension that Get-AzureVMSqlServerExtension retrieves settings from.



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AutoPatchingSettings <AutoPatchingSettings>

Specifies the automatic SQL Server patching settings.



Required? false

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AutoBackupSettings <AutoBackupSettings>

Specifies the automatic SQL Server backup settings.



Required? false

Position? 4

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-KeyVaultCredentialSettings <KeyVaultCredentialSettings>





Required? false

Position? 5

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-VM <IPersistentVM>

Specifies the persistent virtual machine object.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Disable [<SwitchParameter>]

Indicates that this cmdlet disables the extension state.



Required? false

Position? 2

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Uninstall [<SwitchParameter>]

Indicates that this cmdlet uninstalls the SQL Server extension from the virtual machine.



Required? false

Position? 2

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- Example 1: Set autopatching 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 autobackup 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.



RELATED LINKS

Get-AzureVMSqlServerExtension

Remove-AzureVMSqlServerExtension