I am executing the below command, i want to fetch the list of licenses using c#
Get-csonlineuser -Identity firstname.lastname@example.org |select-object *policy
Are you implying that your C# program is calling PowerShell code to retrieve the policy information and you are trying to figure out how to consume the output in your C# program?
If that is the case you would be better off just having C# use the Microsoft.Rtc.Management.ADConnect.Schema.ADOCOnlineUser class directly. That is the class of object returned by Get-CsOnlineUser.
Powered by IDERA