Why does Get-CsUserAcp returns AcpInfo in the XML tags

Hi,

Why does Get-CsUserAcp returns AcpInfo in the XML tags as shown below

AcpInfo            : {<acpInformation default="true">
                       <tollNumber>22222</tollNumber>
                       <tollFreeNumber>22221</tollFreeNumber>
                       <participantPassCode>22222</participantPassCode>
                       <domain>condevlab3.com</domain>
                       <name>acptwo</name>
                     </acpInformation>, <acpInformation>
                       <tollNumber>33333</tollNumber>
                       <tollFreeNumber>33331</tollFreeNumber>
                       <participantPassCode>33333</participantPassCode>
                       <domain>condevlab3.com</domain>
                       <name>acpthree</name>
                     </acpInformation>}
Name               : mar12b mar12b
DistinguishedName  : CN=mar12b mar12b,OU=OU1,DC=condevlab3,DC=com

I am writing C# code from which I am trying to get user AcpInfo details, using Windows Remote Management to call powershell commands.
With the AcpInfo returned in XML tags, it is required to do unnecessary processing in C# code to extract the required information.
Is there any way to get these details in the Name/Value pair format in an PSObject (the way it will return user information with Get-CsUser command),
Default            : true
dollNumber      : 22222
etc.

Thanks in advance,

Pruthvi

  • Edited by Pruthvi_ 21 hours 15 minutes ago
April 9th, 2015 6:10am

That's not XML, that's PowerShell object just with deeper levels. 

Instead of using something like $user.name you'd want to go a level deeper.  Such as

$user.acpinfo.tollfreenumbers

Free Windows Admin Tool Kit Click here and download it now
April 9th, 2015 11:33am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics