Set-AzureRmSqlServerAdvisorAutoExecuteStatus
Updates the auto execute status of an Azure SQL Server Advisor.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Set-AzureRmSqlServerAdvisorAutoExecuteStatus
-AdvisorName <String>
-AutoExecuteStatus <AdvisorAutoExecuteStatus>
-ServerName <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzureRmSqlServerAdvisorAutoExecuteStatus cmdlet sets the auto execute property for an Azure SQL Server Advisor.
Examples
Example 1: Enable auto execute for an Advisor
PS C:\>Set-AzureRmSqlServerAdvisorAutoExecuteStatus -ResourceGroupName "WIRunnersProd" -ServerName "wi-runner-australia-east" -AdvisorName "CreateIndex" -AutoExecuteStatus Enabled
ResourceGroupName : WIRunnersProd
ServerName : wi-runner-australia-east
AdvisorName : CreateIndex
AdvisorStatus : GA
AutoExecuteStatus : Enabled
AutoExecuteStatusInheritedFrom : Server
LastChecked : 8/1/2016 2:36:47 PM
RecommendationsStatus : Ok
RecommendedActions : {}
This command enables the auto execute status of an Advisor named CreateIndex.
Parameters
-AdvisorName
Specifies the name of the advisor for which this cmdlet updates the auto execute status.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AutoExecuteStatus
Specifies the value to which this cmdlet updates the auto execute status. The acceptable values for this parameter are:
- Enabled
- Disabled
- Default
Type: | AdvisorAutoExecuteStatus |
Accepted values: | Enabled, Disabled, Default |
Position: | Named |
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: | 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: | AzureRmContext, AzureCredential |
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 server.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServerName
Specifies the name of the server.
Type: | String |
Position: | Named |
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
Notes
- Keywords: azure, azurerm, arm, resource, management, manager, sql, server, mssql, advisor