I have the following:\[code\]$aMyArray = $null[xml]$userfile = Get-Content C:\AppSense\Scripts\AmPolicyConversion\AM_dev.xml$i = 0FOREACH ($j in $userfile.ChildNodes){ FOREACH($k in $j.DocumentElement) { } $i = $i + 1}\[/code\]I am trying to figure out how to loop through each element within powershell.Then check for an attribute of SID on the element.If exists get attribute value and put that value into an object and for the same element grab second attribute DISPLAYNAME and place into same object. We will create an array of objects. I know I am way off but hope you can help.