in this xml, what are FTP, SSHFTP, and Share considered/called, and how would I extract them with powershell? in other words, if I wanted to populate an array with type, Id, Name, where “type” is ftp, sshftp, or share, how would I get the type with powershell?
I’ve imported it with get-content as [xml] and I can get to $xml.settings.hosts.
from there, if I do $xml.settings.hosts.ftp, I see a chart (looks like an array, but get-member tells me it’s an xmlelement) with all the ftp IDs and Names, but I don’t actually see the label “ftp” anywhere. and the parentnode is “hosts,” not “ftp.”
convert your xml to PScutomerobject then you will get more flexibility to use it
Example: (Easy way as I don't know how you going to use this xml file ) as below example below 3 PowerShell objects created
$PSObjectftp,$PSObjectSSHFTP,$PSObjectShare