你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzureRmOperationalInsightsSavedSearch
返回指定工作区的所有已保存搜索。
警告
截至 2024 年 2 月 29 日,AzureRM PowerShell 模块已正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。
尽管 AzureRM 模块仍可能正常运行,但它不再维护或受支持,但会根据用户的自由裁量权和风险继续使用任何继续使用模块。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源。
语法
Get-AzureRmOperationalInsightsSavedSearch
[-ResourceGroupName] <String>
[-WorkspaceName] <String>
[[-SavedSearchId] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzureRmOperationalInsightsSavedSearch cmdlet 返回指定资源组中指定工作区的所有已保存搜索(如果未指定已保存的搜索 ID)。 如果确实指定了已保存的搜索 ID,则会返回与该 ID 对应的已保存搜索。
示例
示例 1:获取工作区的所有已保存搜索
PS C:\>Get-AzureRmOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace"
此命令获取与工作区关联的所有已保存资源。
示例 2:按 ID 获取特定的已保存搜索
PS C:\>Get-AzureRmOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId"
此命令按 ID 获取特定的已保存搜索。
参数
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
类型: | IAzureContextContainer |
别名: | AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
指定包含工作区的 Azure 资源组的名称。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-SavedSearchId
指定保存的搜索 ID。
类型: | String |
Position: | 2 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-WorkspaceName
指定工作区名称。
类型: | String |
别名: | Name |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
输入
输出
PSSearchListSavedSearchResponse
PSSearchGetSavedSearchResponse