共用方式為


Set-AzOperationalInsightsStorageInsight

更新 Storage Insight。

語法

Set-AzOperationalInsightsStorageInsight
   [-ResourceGroupName] <String>
   [-WorkspaceName] <String>
   [-Name] <String>
   [[-StorageAccountKey] <String>]
   [-StorageAccountResourceId] <String>
   [[-Tables] <String[]>]
   [[-Containers] <String[]>]
   [-ETag <String>]
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzOperationalInsightsStorageInsight
   [-Workspace] <PSWorkspace>
   [-Name] <String>
   [[-StorageAccountKey] <String>]
   [-StorageAccountResourceId] <String>
   [[-Tables] <String[]>]
   [[-Containers] <String[]>]
   [-ETag <String>]
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-AzOperationalInsightsStorageInsight Cmdlet 會變更 Storage Insight 的組態。

範例

範例 1:依名稱修改 Storage Insight

Set-AzOperationalInsightsStorageInsight -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "MyWorkspace" -Name "MyStorageInsight" -Tables @("WADWindowsEventLogsTable")

此命令會修改名為 MyStorageInsight 的 Storage Insight 讀取所在的數據表。

範例 2:使用工作區物件修改 Storage Insight

$Workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace"

Set-AzOperationalInsightsStorageInsight -Workspace $Workspace -Name "MyStorageInsight" -Containers @("wad-iis-logfiles")

第一個命令會使用 Get-AzOperationalInsightsWorkspace Cmdlet 來取得名為 MyWorkspace 的工作區,然後將它儲存在$Workspace變數中。 第二個命令會修改名為 MyStorageInsight 的 Storage Insight 讀取所在的容器。

參數

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Containers

指定提供數據的容器清單。

類型:String[]
Position:7
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ETag

StorageInsight 的 ETag。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-Name

指定 Storage Insight 的名稱。

類型:String
Position:3
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceGroupName

指定包含工作區的 Azure 資源群組名稱。

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-StorageAccountKey

指定記憶體帳戶的存取金鑰。

類型:String
Position:4
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-StorageAccountResourceId

記憶體帳戶的完整 Azure Resource Manager 識別符。

類型:String
Position:5
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Tables

指定包含資料的數據表清單。

類型:String[]
Position:6
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-Tag

Storage Insight 的標記

類型:Hashtable
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Workspace

指定包含 Storage Insight 的工作區。

類型:PSWorkspace
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WorkspaceName

指定工作區的名稱。

類型:String
Position:2
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

輸入

PSWorkspace

String

String[]

輸出

PSStorageInsight