janikvonrotz
10/7/2013 - 10:57 AM

PowerShell: Get Content of Multiple Configuration Files #PowerShell

PowerShell: Get Content of Multiple Configuration Files #PowerShell

# Get Mail Error Report Configuration
$MailConfigs = Get-ChildItem -Path $PSconfigs.Path -Filter $PSconfigs.Mail.Filter -Recurse | %{[xml]$(get-content $_.FullName)} | %{$_.Content.Mail | where{$_.Name -eq $PSconfigs.Mail.ErrorClass}} | select -first 1