【发布时间】:2014-06-05 18:33:57
【问题描述】:
使用 Powershell,我通过 WMI 检索 Windows 组。然后我尝试修改属性并更新对象,但失败了(请参阅下面的错误消息)。怎么了 ?
$group = Get-WmiObject Win32_Group -Filter ("Domain='{0}' and Name='{1}'" -f $env:ComputerName, $groupName)
$group.Description = $newDescription
$group.Put()
错误: System.Management.Automation.MethodInvocationException:使用“0”参数调用“Put”的异常:“提供者无法尝试操作”---> System.Management .ManagementException:提供者无法进行尝试的操作
【问题讨论】:
标签: powershell wmi