I am getting an error when attempting to run the following in C#.
The error is:
Exception:Thrown Unable to load DLL wldp.dll
PowerShell ps = PowerShell.Create();
ps.AddCommand("Get-BrokerSession");
ps.AddParameter("AdminAddress");
ps.AddParameter("MYSERVERNAMEHERE");
Collection<PSObject> psr = ps.Invoke();
It's also saying that Get-BrokerSession is not a recognized command, yet I can use this at the PS command prompt without issue.