Set-AzureRmOperationalInsightsWorkspace
Updates a workspace.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
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: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the workspace name.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the Azure resource group name.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
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 |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
The resource tags for the workspace.
Type: | Hashtable |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Workspace
Specifies the workspace to be updated.
Type: | PSWorkspace |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Parameters: Workspace (ByValue)
Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]