Enable-AzHDInsightAzureMonitor
Enables Azure Monitor in a specified HDInsight cluster.
Syntax
Enable-AzHDInsightAzureMonitor
[[-ResourceGroupName] <String>]
[-ClusterName] <String>
[-WorkspaceId] <String>
[-PrimaryKey] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Enable-AzHDInsightAzureMonitor
[-ResourceId] <String>
[-WorkspaceId] <String>
[-PrimaryKey] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Enable-AzHDInsightAzureMonitor
[-InputObject] <AzureHDInsightCluster>
[-WorkspaceId] <String>
[-PrimaryKey] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet Enable-AzHDInsightAzureMonitor enables Azure Monitor in a specified HDInsight cluster.
Examples
Example 1
# Cluster info
$clusterName = "your-hadoop-001"
$resourceGroupName = "Group"
$workspaceId = "your-workspace-id"
$primaryKey = "your-primary-key"
Enable-AzHDInsightAzureMonitor -ClusterName $clusterName -ResourceGroupName $resourceGroupName -WorkspaceId $workspaceId -PrimaryKey $primaryKey
This cmdlet enables the azure monitor in a specified HDInsight cluster.
Example 2
# Cluster info
$clusterName = "your-hadoop-001"
$cluster=Get-AzHDInsightCluster -ClusterName $clusterName
$workspaceId = "your-workspace-id"
$primaryKey = "your-primary-key"
$cluster | Enable-AzHDInsightAzureMonitor -WorkspaceId $workspaceId -PrimaryKey $primaryKey
This cmdlet enables the azure monitor in a specified HDInsight cluster with pipeline.
Parameters
Gets or sets the name of the cluster.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets or sets the input object.
| Type: | AzureHDInsightCluster |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Gets to sets the primary key of the Log Analytics workspace.
| Type: | String |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets or sets the name of the resource group.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets or sets the resource id.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets or sets the ID of the Log Analytics workspace.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
Outputs
Related Links
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ