New-AzOperationalInsightsSavedSearch
Creates a new saved search with the specified parameters.
Syntax
Default (Default)
New-AzOperationalInsightsSavedSearch
[-ResourceGroupName] <String>
[-WorkspaceName] <String>
[-SavedSearchId] <String>
[-DisplayName] <String>
[-Category] <String>
[-Query] <String>
[[-Tag] <Hashtable>]
[[-Version] <Int64>]
[[-FunctionAlias] <String>]
[[-FunctionParameter] <String>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzOperationalInsightsSavedSearch cmdlet creates a new saved search with the specified parameters for the workspace.
Examples
Example 1: Create a new saved search
New-AzOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId" -DisplayName "ContosoSavedSearchDisplayName" -Category "ContosoSavedSearchCategory" -Query "*" -Version 1 -Force
This command creates a new saved search.
Parameters
-Category
The saved search category.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 4
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
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
-DisplayName
The saved search display name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Force
Don't ask for confirmation.
Parameter properties
Type: SwitchParameter
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
-FunctionAlias
The function alias if query serves as a function.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 8
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FunctionParameter
The optional function parameters if query serves as a function.
Value should be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'.
For more examples and proper syntax please refer to https://learn.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions .
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: FunctionParameters
Parameter sets
(All)
Position: 9
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Query
The saved search query.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 5
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
The resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-SavedSearchId
The saved search id.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Tag
The saved search tags.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 6
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Version
The saved search version.
Parameter properties
Type: Int64
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 7
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WorkspaceName
The workspace name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Name
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
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