Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-AzOperationalInsightsWorkspace

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

Syntax

Default (Default)

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.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-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}.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-DisableLocalAuth

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

Parameter properties

Type:

Nullable<T>[Boolean]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ForceCmkForQuery

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

Parameter properties

Type:

Nullable<T>[Boolean]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Location

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Name

Specifies the name of the workspace.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicNetworkAccessForIngestion

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicNetworkAccessForQuery

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-RetentionInDays

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

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Sku

The service tier of the workspace.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SkuCapacity

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

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Tag

The resource tags for the workspace.

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Hashtable

Nullable<T>

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://learn.microsoft.com/azure/monitoring-and-diagnostics/monitoring-usage-and-estimated-costs#new-pricing-model

Related Links


Feedback

Was this page helpful?