Functions/GetAlerts.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Function Get-Alerts { [cmdletbinding()] param( $deprep ) $a = @() foreach ($alert in $deprep.DeploymentReport.Alerts.Alert) { foreach ($Issue in $alert.Issue) { $a += $alert | Select-Object @{Label = "AlertName"; Expression = {($Alert.Name)}}, @{Label = "IssueValue"; Expression = {($Issue.Value)}}, @{Label = "IssueId"; Expression = {($Issue.Id)}} } } Return $a } |