Set-AzOperationalInsightsWorkspace

Updates a workspace.

Syntax

Set-AzOperationalInsightsWorkspace
   [-ResourceGroupName] <String>
   [-Name] <String>
   [[-Sku] <String>]
   [[-Tag] <Hashtable>]
   [-RetentionInDays <Int32>]
   [-DefaultProfile <IAzureContextContainer>]
   [-PublicNetworkAccessForIngestion <String>]
   [-PublicNetworkAccessForQuery <String>]
   [<CommonParameters>]
Set-AzOperationalInsightsWorkspace
   [-Workspace] <PSWorkspace>
   [[-Sku] <String>]
   [[-Tag] <Hashtable>]
   [-RetentionInDays <Int32>]
   [-DefaultProfile <IAzureContextContainer>]
   [-PublicNetworkAccessForIngestion <String>]
   [-PublicNetworkAccessForQuery <String>]
   [<CommonParameters>]

Description

The Set-AzOperationalInsightsWorkspace cmdlet changes the configuration of a workspace.

Examples

Example 1: Modify a workspace by name

PS C:\>Set-AzOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" -Sku Standard -Tags @{ "Department" = "IT" }

This command modifies the SKU and tags of the workspace named MyWorkspace in the resource group named ContosoResourceGroup.

Example 2: Update a workspace by using the pipeline

PS C:\>Get-AzOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" | Set-AzOperationalInsightsWorkspace -Sku "Premium"

This command uses the Get-AzOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkSpace, and then passes it to the Set-AzOperationalInsightsWorkspace cmdlet by using the pipeline operator to set the SKU to Premium.

Parameters

-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the workspace name.

Type:String
Position:2
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:Named
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:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Specifies the Azure resource group name.

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

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

  • free
  • standard
  • premium
  • pernode
  • standalone
  • pergb2018
Type:String
Accepted values:free, standard, premium, pernode, standalone, pergb2018
Position:3
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Tag

The resource tags for the workspace.

Type:Hashtable
Position:4
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Workspace

Specifies the workspace to be updated.

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

Inputs

PSWorkspace

String

Hashtable

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

Outputs

PSWorkspace