add: Error handling to output functions

This commit is contained in:
DrIOS
2024-06-23 16:06:02 -05:00
parent b6423c8a7d
commit 4dd65a0140
2 changed files with 7 additions and 8 deletions

View File

@@ -266,9 +266,7 @@ function Get-CISMSTeamsOutput {
$CsTeamsMessagingPolicy = Get-CsTeamsMessagingPolicy -Identity Global | Select-Object -Property AllowSecurityEndUserReporting
return $CsTeamsMessagingPolicy
}
default {
Write-Output "No matching action found"
}
default { throw "No match found for test: $Rec" }
}
}
end {