Skip to content

Commit

Permalink
Small fixes to info in alerts.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjantzen committed Mar 29, 2023
1 parent b8971b1 commit fc41da3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions User Audit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2754,7 +2754,7 @@ if ($FullMatches) {
$AssignedDevices = $Existing_RelatedItems | Where-Object { $_.attributes.'asset-type' -eq 'configuration' -and $_.attributes.notes -like "*User*" -and !$_.attributes.archived }

if ($AssignedDevices -and ($AssignedDevices | Measure-Object).count -gt 0) {
$EmailOnlyDetails = "Has the following devices assigned in ITG: " + ($AssignedDevices.name -join ", ")
$EmailOnlyDetails = "Has the following devices assigned in ITG: " + ($AssignedDevices.attributes.name -join ", ")
$EmailOnly = $false
}
}
Expand Down Expand Up @@ -2904,6 +2904,8 @@ if ($FullMatches) {
if (($EmployeeGroups | Measure-Object).Count -eq 0) {
$EmailOnlyDetails = "Not in any employee AD groups."
$EmailOnly = $true
} else {
$EmailOnlyDetails = "In the Employee AD groups: " + ($EmployeeGroups -join ", ")
}
} elseif ($O365Match.RecipientTypeDetails -notlike 'UserMailbox') {
$EmailOnlyDetails = "Mailbox is not a UserMailbox"
Expand Down Expand Up @@ -2953,7 +2955,7 @@ if ($FullMatches) {
$AssignedDevices = $Existing_RelatedItems | Where-Object { $_.attributes.'asset-type' -eq 'configuration' -and $_.attributes.notes -like "*User*" -and !$_.attributes.archived }

if ($AssignedDevices -and ($AssignedDevices | Measure-Object).count -gt 0) {
$EmailOnlyDetails = "Has the following devices assigned in ITG: " + ($AssignedDevices.name -join ", ")
$EmailOnlyDetails = "Has the following devices assigned in ITG: " + ($AssignedDevices.attributes.name -join ", ")
$EmailOnly = $false
}
}
Expand Down
6 changes: 4 additions & 2 deletions User_Billing_Update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ if ($UserAudit) {
$AssignedDevices = $Existing_RelatedItems | Where-Object { $_.attributes.'asset-type' -eq 'configuration' -and $_.attributes.notes -like "*User*" -and !$_.attributes.archived }

if ($AssignedDevices -and ($AssignedDevices | Measure-Object).count -gt 0) {
$EmailOnlyDetails = "Has the following devices assigned in ITG: " + ($AssignedDevices.name -join ", ")
$EmailOnlyDetails = "Has the following devices assigned in ITG: " + ($AssignedDevices.attributes.name -join ", ")
$EmailOnly = $false
}
}
Expand Down Expand Up @@ -1373,6 +1373,8 @@ if ($UserAudit) {
if (($EmployeeGroups | Measure-Object).Count -eq 0) {
$EmailOnlyDetails = "Not in any employee AD groups."
$EmailOnly = $true
} else {
$EmailOnlyDetails = "In the Employee AD groups: " + ($EmployeeGroups -join ", ")
}
} elseif ($O365Match.RecipientTypeDetails -notlike 'UserMailbox') {
$EmailOnlyDetails = "Mailbox is not a UserMailbox"
Expand Down Expand Up @@ -1422,7 +1424,7 @@ if ($UserAudit) {
$AssignedDevices = $Existing_RelatedItems | Where-Object { $_.attributes.'asset-type' -eq 'configuration' -and $_.attributes.notes -like "*User*" -and !$_.attributes.archived }

if ($AssignedDevices -and ($AssignedDevices | Measure-Object).count -gt 0) {
$EmailOnlyDetails = "Has the following devices assigned in ITG: " + ($AssignedDevices.name -join ", ")
$EmailOnlyDetails = "Has the following devices assigned in ITG: " + ($AssignedDevices.attributes.name -join ", ")
$EmailOnly = $false
}
}
Expand Down
2 changes: 1 addition & 1 deletion currentversion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.17.5
2.17.6

0 comments on commit fc41da3

Please sign in to comment.