我开发了一个管理Skype For Business用户配置的应用程序
我需要运行的其中一个操作应该使用以下命令设置Skype用户的注册器池:
Move-CsUser -Identity [UserName] -Target [RegistrarPool] -Confirm:$false
现在当我从命令行运行命令时 - 它运行得很好 但是,与我在我的应用程序中使用的其他Skype shell命令不同, 当我使用我的c#代码运行该命令时,我得到了这个可怕的错误:
Move-CsUser : Unable to cast COM object of type 'System.__ComObject' to interface type \r\n
'Microsoft.Rtc.Interop.User.ICsUserManagement'. This operation failed because the QueryInterface call on the COM \r\n
component for the interface with IID '{D5ADD966-BDC3-4A8F-BFE8-6A59A9F74CB2}' failed due to the following error: Class \r\n
not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).\r\nAt line:1 char:1\r\n+
Move-CsUser -Identity 'testuser' -Target 'XXX' -Confirm: ...\r\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\r\n +
CategoryInfo : InvalidOperation: (CN=Agent Develo...DC=il,DC=tleumi:OCSADUser) [Move-CsUser], InvalidCa \r\n stException\r\n
+ FullyQualifiedErrorId : MoveError,Microsoft.Rtc.Management.AD.Cmdlets.MoveOcsUserCmdlet\r\n \r\n"
尽管我尽力解决COM对象的错误,但我显然很难克服COM对象的错误。答案 0 :(得分:0)