Enable exceptions to be thrown
        Change the default exception behavior of the module to support throwing exceptions
        Useful when the module is used in an automated fashion, like inside Azure DevOps pipelines and large PowerShell scripts
        PS C:\>Enable-D365Exception
        This will for the rest of the current PowerShell session make sure that exceptions will be thrown.
        Tags: Exception, Exceptions, Warning, Warnings
        Author: Mötz Jensen (@Splaxi)

function Enable-D365Exception {
    param ()

    Write-PSFMessage -Level Verbose -Message "Enabling exception across the entire module." -Target $configurationValue

    Set-PSFFeature -Name 'PSFramework.InheritEnableException' -Value $true -ModuleName ""
    Set-PSFFeature -Name 'PSFramework.InheritEnableException' -Value $true -ModuleName "PSOAuthHelper"
    $PSDefaultParameterValues['*:EnableException'] = $true