你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzureRmOperationalInsightsWorkspace
汇报工作区。
警告
截至 2024 年 2 月 29 日,AzureRM PowerShell 模块已正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。
尽管 AzureRM 模块仍可能正常运行,但它不再维护或受支持,但会根据用户的自由裁量权和风险继续使用任何继续使用模块。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源。
语法
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>]
说明
Set-AzureRmOperationalInsightsWorkspace cmdlet 更改工作区的配置。
示例
示例 1:按名称修改工作区
PS C:\>Set-AzureRmOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" -Sku Standard -Tags @{ "Department" = "IT" }
此命令修改名为 ContosoResourceGroup 的资源组中名为 MyWorkspace 的工作区的 SKU 和标记。
示例 2:使用管道更新工作区
PS C:\>Get-AzureRmOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" | Set-AzureRmOperationalInsightsWorkspace -Sku "Premium"
此命令使用 Get-AzureRmOperationalInsightsWorkspace cmdlet 获取名为 MyWorkSpace 的工作区,然后使用管道运算符将 SKU 设置为高级版,将其传递给 Set-AzureRmOperationalInsightsWorkspace cmdlet。
参数
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
类型: | IAzureContextContainer |
别名: | AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
指定工作区名称。
类型: | String |
Position: | 2 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
指定 Azure 资源组名称。
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-RetentionInDays
工作区数据保留期(以天为单位)。 730 天是所有其他 SKU 允许的最大天数
类型: | Nullable<T>[Int32] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Sku
指定工作区的服务层。 有效值为:
- 可用
- standard
- 高级
类型: | String |
接受的值: | free, standard, premium, pernode, standalone |
Position: | 3 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Tag
工作区的资源标记。
类型: | Hashtable |
Position: | 4 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Workspace
指定要更新的工作区。
类型: | PSWorkspace |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
输入
参数:工作区(ByValue)
Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]