我正在尝试运行此脚本:
Connect-msolservice -Credential $mycreds
Disable-MsolDevice -DeviceId device id here -Force
但是我收到此错误:
Disable-MsolDevice : Method not found: 'Void System.Data.Services.Client.DataServiceClientFormat.set_LoadServiceModel(System.Func`1<Microsoft.Data.Edm.IEdmModel>)'.
At line:1 char:1
+ Disable-MsolDevice -DeviceId device idh ere -Fo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [Disable-MsolDevice], MissingMethodException
+ FullyQualifiedErrorId : System.MissingMethodException,Microsoft.Online.Administration.Automation.DisableDevice
有人知道这个错误是什么吗?
它可以在我的主PC上运行,但不能在服务器上运行,因此可能缺少模块或其他东西。