Set-AzureRmOperationalInsightsWorkspace

Updates a workspace.

Important

You've reached a webpage for an outdated version of Azure PowerShell. All versions of the AzureRM PowerShell module are outdated, but not out of support. The Az PowerShell module is now the recommended PowerShell module for interacting with Azure. To get started with the Az PowerShell module, see Install Azure PowerShell. To learn how to migrate to the Az PowerShell module, see Migrate Azure PowerShell from AzureRM to Az.

Syntax

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

Description

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

Examples

Example 1: Modify a workspace by name

PS C:\>Set-AzureRmOperationalInsightsWorkspace -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-AzureRmOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" | Set-AzureRmOperationalInsightsWorkspace -Sku "Premium"

This command uses the Get-AzureRmOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkSpace, and then passes it to the Set-AzureRmOperationalInsightsWorkspace 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.IAzureContextContainer
Aliases: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
-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
Type:String
Accepted values:free, standard, premium, pernode, standalone
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

Parameters: Workspace (ByValue)

String

Hashtable

Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Outputs

PSWorkspace