Atreidae / UcmPSTools

A collection of Teams Unified Communications related PowerShell functions as part of the UcmPSTools PowerShell Module.
MIT License
6 stars 1 forks source link

New-UcmEXHOConnection reports sucsess, even on failure #6

Closed Atreidae closed 3 years ago

Atreidae commented 3 years ago

image

`PS C:\UcMadScientist\PowerShell-Functions> New-UcmEXHOConnection VERBOSE: New-UcmEXHOConnection called with New-UcmEXHOConnection

INFO: Connecting to Exchange Online New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. At C:\UcMadScientist\PowerShell-Functions\public\New-UcmEXHOConnection.ps1:127 char:25

Name Value


Function New-UcmEXHOConnection
Status OK
Message Connected
`

Atreidae commented 3 years ago

Looking at the fucntion, its actually missing the try/catch block. Doh!