< Back

Set-AzureRmSqlServerAdvisorAutoExecuteStatus

Tue Jan 29, 2019 10:10 pm

NAME Set-AzureRmSqlServerAdvisorAutoExecuteStatus



SYNOPSIS

Updates the auto execute status of an Azure SQL Server Advisor.





SYNTAX

Set-AzureRmSqlServerAdvisorAutoExecuteStatus [-ResourceGroupName] <String> -AdvisorName <String> -AutoExecuteStatus {Enabled | Disabled | Default}

[-DefaultProfile <IAzureContextContainer>] -ServerName <String> [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Set-AzureRmSqlServerAdvisorAutoExecuteStatus cmdlet sets the auto execute property for an Azure SQL Server Advisor.





PARAMETERS

-AdvisorName <String>

Specifies the name of the advisor for which this cmdlet updates the auto execute status.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AutoExecuteStatus <AdvisorAutoExecuteStatus>

Specifies the value to which this cmdlet updates the auto execute status.



The acceptable values for this parameter are:



- Enabled



- Disabled



- Default



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the resource group of the server.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServerName <String>

Specifies the name of the server.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

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 (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Sql.Advisor.Model.AzureSqlServerAdvisorModel







NOTES





* Keywords: azure, azurerm, arm, resource, management, manager, sql, server, mssql, advisor



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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... cutestatus

Get-AzureRmSqlServerAdvisor

SQL Database Documentation https://docs.microsoft.com/azure/sql-database/