Bewerken

Delen via


New-AzMonitorLogAnalyticsSolution

Creates a log analytics solution.

Syntax

New-AzMonitorLogAnalyticsSolution
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -Type <String>
   -Location <String>
   -WorkspaceResourceId <String>
   [-Tag <Hashtable>]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Creates a log analytics solution.

Examples

Example 1: Create a monitor log analytics solution for the log analytics workspace

$workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName azureps-manual-test -Name monitoringworkspace-2vob7n
New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName azureps-manual-test -Location $workspace.Location -WorkspaceResourceId $workspace.ResourceId

Name                                   Type                                     Location
----                                   ----                                     --------
Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions East US

This command creates a monitor log analytics solution for the log analytics workspace.

Commonly used types are:

Type Description
SecurityCenterFree Azure Security Center - Free Edition
Security Azure Security Center
Updates Update Management
ContainerInsights Azure Monitor for Containers
ServiceMap Service Map
AzureActivity Activity log analytics
ChangeTracking Change tracking and inventory
VMInsights Azure Monitor for VMs
SecurityInsights Azure Sentinel
NetworkMonitoring Network Performance Monitor
SQLVulnerabilityAssessment SQL Vulnerability Assessment
SQLAdvancedThreatProtection SQL Advanced Threat Protection
AntiMalware Antimalware Assessment
AzureAutomation Automation Hybrid Worker
LogicAppsManagement Logic Apps Management
SQLDataClassification SQL Data Discovery & Classification

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

Resource location. Must be the same as the log analytic workspace.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group to get. The name is case insensitive.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tag

Resource tags

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Type

Type of the solution to be created. For example "Container".

Type:String
Aliases:SolutionType
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceResourceId

The Azure resource ID for the workspace where the solution will be deployed/enabled.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Outputs

ISolution