Set-AzureRmOperationalInsightsWorkspace

Updates a workspace.

Syntax

Set-AzureRmOperationalInsightsWorkspace
   [-ResourceGroupName] <String>
   [-Name] <String>
   [[-Sku] <String>]
   [[-Tags] <Hashtable>]
   [-RetentionInDays <Int32>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Set-AzureRmOperationalInsightsWorkspace
   [-Workspace] <PSWorkspace>
   [[-Sku] <String>]
   [[-Tags] <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.

Required Parameters

-Name

Specifies the workspace name.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the Azure resource group name.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Workspace

Specifies the workspace to be updated.

Type:Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

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

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

Type:System.Nullable`1[System.Int32]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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, pernode, standalone
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:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

PSWorkspace

Parameter 'Workspace' accepts value of type 'PSWorkspace' from the pipeline

Outputs

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace