共用方式為


New-AzOperationalInsightsComputerGroup

建立計算機群組。

語法

New-AzOperationalInsightsComputerGroup
   [-ResourceGroupName] <String>
   [-WorkspaceName] <String>
   [-SavedSearchId] <String>
   [-DisplayName] <String>
   [-Category] <String>
   [-Query] <String>
   [[-Version] <Int64>]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

New-AzOperationalInsightsComputerGroup Cmdlet 會在資源群組和位置中建立計算機群組。

範例

範例 1

建立計算機群組。 ( 自動產生 )

New-AzOperationalInsightsComputerGroup -Category 'ContosoSavedSearchCategory' -DisplayName 'ContosoSavedSearchDisplayName' -Query 'Type=Event' -ResourceGroupName myresourcegroup -SavedSearchId 'ContosoSavedSearchId' -Version 1 -WorkspaceName <String>

參數

-Category

指定計算機群組的類別。

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

-Confirm

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

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

-DefaultProfile

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

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

-DisplayName

指定計算機群組的顯示名稱。

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

-Force

強制命令執行,而不要求使用者確認。

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

-Query

指定計算機群組的查詢。

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

-ResourceGroupName

指定 Azure 資源群組的名稱。 Cmdlet 會在此資源群組中建立計算機群組。

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

-SavedSearchId

指定計算機群組的識別碼。

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

-Version

指定版本。

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

-WhatIf

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

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

-WorkspaceName

指定工作區的名稱。

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

輸入

String

Int64

輸出

PSSavedSearchValue