New-AzOperationalInsightsWorkspace

Creates a workspace, or restore a soft-deleted workspace.

Syntax

New-AzOperationalInsightsWorkspace
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [[-Sku] <String>]
   [-SkuCapacity <Int32>]
   [[-Tag] <Hashtable>]
   [[-RetentionInDays] <Int32>]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [[-PublicNetworkAccessForIngestion] <String>]
   [[-PublicNetworkAccessForQuery] <String>]
   [[-ForceCmkForQuery] <Boolean>]
   [[-DisableLocalAuth] <Boolean>]
   [-DefaultDataCollectionRuleResourceId <String>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzOperationalInsightsWorkspace cmdlet creates a workspace in the specified resource group and location. Or restore a soft-deleted workspace.

Examples

Example 1: Create a workspace by name

New-AzOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" -Location "East US"

This command creates a standard SKU workspace named MyWorkspace in the resource group named ContosoResourceGroup.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultDataCollectionRuleResourceId

The resource ID of the default Data Collection Rule to use for this workspace. Expected format is - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}.

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

-DefaultProfile

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

-DisableLocalAuth

Allow to opt-out of local authentication and ensure customers can use only MSI and AAD for exclusive authentication

Type:Nullable<T>[Boolean]
Position:10
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

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

-ForceCmkForQuery

Gets or sets indicates whether customer managed storage is mandatory for query management

Type:Nullable<T>[Boolean]
Position:9
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Location

Specifies the location in which to create the workspace, for example, East US or West Europe.

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

-Name

Specifies the name of the workspace.

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

-PublicNetworkAccessForIngestion

The network access type for accessing workspace ingestion. Value should be 'Enabled' or 'Disabled'

Type:String
Position:7
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-PublicNetworkAccessForQuery

The network access type for accessing workspace query. Value should be 'Enabled' or 'Disabled'

Type:String
Position:8
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Specifies the name of an Azure resource group. The workspace is created in this resource group.

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

-RetentionInDays

The workspace data retention in days. 730 days is the maximum allowed for all other Skus

Type:Nullable<T>[Int32]
Position:6
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-Sku

The service tier of the workspace.

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

-SkuCapacity

Sku Capacity, value need to be multiple of 100 and at least 0.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Tag

The resource tags for the workspace.

Type:Hashtable
Position:5
Default value:None
Accept pipeline input:True
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:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Hashtable

Nullable<T>[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

Outputs

PSWorkspace

Notes

A new pricing model has been released. If you are a CSP that means that you have to use "standalone" for the sku. Behind the scenes, the sku will be changed to pergb2018. For more information, please see the following: https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-usage-and-estimated-costs#new-pricing-model