New-​Azure​Rm​Operational​Insights​Workspace

Creates a workspace.

Syntax

New-AzureRmOperationalInsightsWorkspace
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [[-Sku] <String>]
   [[-CustomerId] <Guid>]
   [[-Tags] <Hashtable>]
   [-Force]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmOperationalInsightsWorkspace cmdlet creates a workspace in the specified resource group and location.

Examples

Example 1: Create a workspace by name

PS C:\>New-AzureRmOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" -Location "East US" -Sku "Standard"

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

Example 2: Create a workspace and link it to an existing account

PS C:\>$OILinkTargets = Get-AzureRmOperationalInsightsLinkTargets

PS C:\>$OILinkTargets[0] | New-AzureRmOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" -Sku "Standard"

The first command uses the Get-AzureRmOperationalInsightsLinkTargets cmdlet to get Operational Insights account link targets, and then stores them in the $OILinkTargets variable.

The second command passes the first account link target in $OILinkTargets to the New-AzureRmOperationalInsightsWorkspace cmdlet by using the pipeline operator. The command creates a standard SKU workspace named MyWorkspace that is linked to the first Operational Insights account in $OILinkTargets.

Required Parameters

-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 (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies the name of the workspace.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
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 (ByPropertyName)
Accept wildcard characters:False

Optional 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
-CustomerId

Specifies the account to which this workspace will be linked. The Get-AzureRmOperationalInsightsLinkTargets cmdlet can also be used to list the potential accounts.

Type:Guid
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
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
-Sku

Specifies the service tier of the workspace. Valid values are:

  • free
  • standard
  • premium
Type:String
Parameter Sets:free, standard, premium
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Tags

Specifies the resource tags for the workspace.

Type:Hashtable
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName)
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