Reading Configuration Files with Powershell Part 2
Following the recently published article on reading xml configuration files using PowerShell, we are going to enrich the configuration file and create custom PowerShell objects. This time the configuration file is a bit different, we have multiple "Company" nodes that have inline properties. <configuration> <Company Name= "Company1" > <Group DN= "CN=Group1,OU=Groups,OU=Company1,DC=lab,DC=local" Name= "Group1" /> <OU DN= "OU=Users,OU=Company1,DC=lab,DC=local" /> </Company> <Company Name= "Company2" > <Group DN= "CN=Group2,OU=Groups,OU=Company2,DC=lab,DC=local" Name= "Group2" /> <OU DN= "OU=Users,OU=Company2,DC=lab,DC=local" /> </Company> </configuration> There aren't many changes in the script, just in the variable that holds the entire configuration. Param ...