AD FS 2.0使用power shell API添加依赖方? [英] AD FS 2.0 add relying party using power shell API?
问题描述
我正在尝试使用Powershell API添加依赖方。我正在使用AD FS 2.0。我按照链接
PowerShell API 中给出的确切步骤进行操作。但是得到上下文的错误。我将尝试调试代码,并在System.Management.Automation中的某处提供错误。
I am trying to add Relying Party using Powershell API. I am using AD FS 2.0. I follow exact steps given in link PowerShell API . But getting error of context. I ll try to debug the code and get that it is giving error somewhere in System.Management.Automation.
我需要使用代码执行AD FS 2.0管理任务。
I have a requirement of doing AD FS 2.0 management task using code.
如果有任何先决条件,请提供。
Please, provide if there is any prerequisite.
堆栈跟踪
应用程序:ADFSwithCoding.exe
框架版本:v4。 0.30319
描述:由于未处理的异常,进程终止。
异常信息:System.NullReferenceException
Stack:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32,IntPtr)
在System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32)
at System.Management.ManagementObject.Initialize(Boolean)
在System.Management.ManagementBaseObject.get_Properties()
在System.Management.ManagementBaseObject.GetPropertyValue(System.String)
在System.Management.ManagementBaseObject.get_Item(System.String)
在Microsoft.IdentityServer.PowerShell.WmiUtility.GetPolicyStoreAdministrationUrl(System.String)
在Microsoft.IdentityServer.PowerShell.Resources.Managers.ManagerFactory..ctor(System.String)
在Microsoft.IdentityServer.PowerShell.Commands.GetRelyingPartyTrustCommand.BeginProcessing()
在System.Management.Automation.Cmdlet.GetResults()
在System.Management.Automation.Cmdlet +< Invoke> d__0.MoveNext()
at ADFSwithCoding.Program.Main(System.String [])
谢谢和问候,
Kunjan Dalal
Kunjan Dalal
推荐答案
您好Kunjan,您是否能够解决这个问题......我也遇到了确切的问题。谢谢Mark
Hi Kunjan, Were you able to get past this issue ... I'm having the exact problem as well. Thanks Mark
这篇关于AD FS 2.0使用power shell API添加依赖方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!