Set-AzSqlServerMSSupportAudit
變更Microsoft支援 Azure SQL Server 的作業稽核設定。
語法
Set-AzSqlServerMSSupportAudit
[-BlobStorageTargetState <String>]
[-StorageAccountResourceId <String>]
[-EventHubTargetState <String>]
[-EventHubName <String>]
[-EventHubAuthorizationRuleResourceId <String>]
[-LogAnalyticsTargetState <String>]
[-WorkspaceResourceId <String>]
[-PassThru]
[-UseIdentity <String>]
[-ResourceGroupName] <String>
[-ServerName] <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzSqlServerMSSupportAudit
[-BlobStorageTargetState <String>]
[-StorageAccountResourceId <String>]
[-EventHubTargetState <String>]
[-EventHubName <String>]
[-EventHubAuthorizationRuleResourceId <String>]
[-LogAnalyticsTargetState <String>]
[-WorkspaceResourceId <String>]
[-PassThru]
[-UseIdentity <String>]
-ServerObject <AzureSqlServerModel>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Set-AzSqlServerMSSupportAudit Cmdlet 會變更 Azure SQL Server Microsoft支援作業稽核設定。 若要使用 Cmdlet,請使用 ResourceGroupName 和 ServerName 參數來識別伺服器。 當 Blob 記憶體是稽核記錄的目的地時,請指定 StorageAccountResourceId 參數,以判斷稽核記錄的記憶體帳戶。
範例
範例 1:啟用 Blob 記憶體Microsoft支援 Azure SQL Server 的作業稽核原則
Set-AzSqlServerMSSupportAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions/7fe3301d-31d3-4668-af5e-211a890ba6e3/resourceGroups/resourcegroup01/providers/Microsoft.Storage/storageAccounts/mystorage"
範例 2:停用 Blob 記憶體Microsoft支援 Azure SQL Server 的作業稽核原則
Set-AzSqlServerMSSupportAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -BlobStorageTargetState Disabled
範例 3:啟用事件中樞Microsoft支援 Azure SQL Server 的作業稽核原則
Set-AzSqlServerMSSupportAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -EventHubTargetState Enabled -EventHubName "EventHubName" -EventHubAuthorizationRuleResourceId "EventHubAuthorizationRuleResourceId"
範例 4:停用事件中樞Microsoft支援 Azure SQL Server 的作業稽核原則
Set-AzSqlServerMSSupportAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -EventHubTargetState Disabled
範例 5:啟用記錄分析Microsoft支援 Azure SQL Server 的作業稽核原則
Set-AzSqlServerMSSupportAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -LogAnalyticsTargetState Enabled -WorkspaceResourceId "/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2"
範例 6:停用記錄分析Microsoft支援 Azure SQL Server 的作業稽核原則
Set-AzSqlServerMSSupportAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -LogAnalyticsTargetState Disabled
範例 7:透過管線停用記錄分析Microsoft支援 Azure SQL Server 的作業稽核原則
Get-AzSqlServer -ResourceGroupName "ResourceGroup01" -ServerName "Server01" | Set-AzSqlServerMSSupportAudit -LogAnalyticsTargetState Disabled
範例 8:停用傳送Microsoft支援將 Azure SQL Server 的作業稽核記錄傳送至 Blob 記憶體,並啟用將它們傳送至記錄分析。
Set-AzSqlServerMSSupportAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -LogAnalyticsTargetState Enabled -WorkspaceResourceId "/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" -BlobStorageTargetState Disabled
範例 9:啟用將 azure SQL Server 的作業稽核記錄傳送至 Blob 記憶體、事件中樞和記錄分析Microsoft支持作業稽核記錄。
Set-AzSqlServerMSSupportAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions/7fe3301d-31d3-4668-af5e-211a890ba6e3/resourceGroups/resourcegroup01/providers/Microsoft.Storage/storageAccounts/mystorage" -EventHubTargetState Enabled -EventHubName "EventHubName" -EventHubAuthorizationRuleResourceId "EventHubAuthorizationRuleResourceId" -LogAnalyticsTargetState Enabled -WorkspaceResourceId "/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2"
參數
-AsJob
在背景執行 Cmdlet
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-BlobStorageTargetState
指出 blob 記憶體是否為Microsoft支援作業稽核記錄的目的地。
類型: | String |
接受的值: | Enabled, Disabled |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EventHubAuthorizationRuleResourceId
事件中樞授權規則的資源標識碼
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EventHubName
事件中樞的名稱。 如果在提供 EventHubAuthorizationRuleResourceId 時未指定任何專案,則會選取預設事件中樞。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EventHubTargetState
指出事件中樞是否為Microsoft支持作業稽核記錄的目的地。
類型: | String |
接受的值: | Enabled, Disabled |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-LogAnalyticsTargetState
指出記錄分析是否為Microsoft支持作業稽核記錄的目的地。
類型: | String |
接受的值: | Enabled, Disabled |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-PassThru
指定是否要在 Cmdlet 執行結束時輸出Microsoft支援作業稽核原則
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ServerName
SQL 伺服器名稱。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ServerObject
管理其Microsoft支援作業稽核原則的伺服器物件。
類型: | AzureSqlServerModel |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-StorageAccountResourceId
記憶體帳戶資源標識碼
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-UseIdentity
指出是否要使用受控識別。 當您想要在目標記憶體不在防火牆後方時使用受控識別時,這是必要的。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WorkspaceResourceId
您要傳送Microsoft支援作業稽核記錄的Log Analytics工作區的工作區標識碼(Log Analytics 工作區的資源識別符)。 範例:/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
Nullable<T>[[System.UInt32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]