Set-AzOperationalInsightsWorkspace
Syntax
ByName (Default)
Set-AzOperationalInsightsWorkspace
[-ResourceGroupName] <String>
[-Name] <String>
[[-Sku] <String>]
[[-Tag] <Hashtable>]
[[-ForceCmkForQuery] <Boolean>]
[[-DisableLocalAuth] <Boolean>]
[-SkuCapacity <Int32>]
[-RetentionInDays <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-PublicNetworkAccessForIngestion <String>]
[-PublicNetworkAccessForQuery <String>]
[-DailyQuotaGb <Int32>]
[-DefaultDataCollectionRuleResourceId <String>]
[<CommonParameters>]
ByObject
Set-AzOperationalInsightsWorkspace
[-Workspace] <PSWorkspace>
[[-Sku] <String>]
[[-Tag] <Hashtable>]
[[-ForceCmkForQuery] <Boolean>]
[[-DisableLocalAuth] <Boolean>]
[-SkuCapacity <Int32>]
[-RetentionInDays <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-PublicNetworkAccessForIngestion <String>]
[-PublicNetworkAccessForQuery <String>]
[-DailyQuotaGb <Int32>]
[-DefaultDataCollectionRuleResourceId <String>]
[<CommonParameters>]
Description
The Set-AzOperationalInsightsWorkspace cmdlet changes the configuration of a workspace.
Examples
Example 1: Modify a workspace by name
Set-AzOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" -Sku Standard -Tag @{ "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
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
-DailyQuotaGb
The daily volume cap for ingestion - number
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultDataCollectionRuleResourceId
The resource ID of the default Data Collection Rule to use for this workspace. Expected format is - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DisableLocalAuth
Allow to opt-out of local authentication and ensure customers can use only MSI and AAD for exclusive authentication
Parameter properties
Parameter sets
(All)
Position: 10
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ForceCmkForQuery
Gets or sets indicates whether customer managed storage is mandatory for query management
Parameter properties
Parameter sets
(All)
Position: 9
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Specifies the workspace name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByName
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PublicNetworkAccessForIngestion
The network access type for accessing workspace ingestion. Value should be 'Enabled' or 'Disabled'
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PublicNetworkAccessForQuery
The network access type for accessing workspace query. Value should be 'Enabled' or 'Disabled'
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Specifies the Azure resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByName
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-RetentionInDays
The workspace data retention in days. 730 days is the maximum allowed for all other Skus
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Sku
The service tier of the workspace.
Parameter properties
Type: String
Default value: None
Accepted values: free, standard, premium, pernode, standalone, pergb2018, capacityreservation, lacluster
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 3
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-SkuCapacity
Sku Capacity, value need to be multiple of 100 and above 0.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
The resource tags for the workspace.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 4
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Workspace
Specifies the workspace to be updated.
Parameter properties
Type: PSWorkspace
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByObject
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs