Public/Get-O365Token.ps1

Function Get-O365Token {
    Param (
        #
        [Parameter()]
        [String]
        $OS = $PSVersionTable.OS,
        [Parameter()]
        [String]
        $Uri = "https://rhysjtevans.github.io/dtx_cal_sync_redirect"
        
    )
    switch -Wildcard($OS){
        "Darwin*" { 
            & open $Uri
        }
        "Microsoft Windows*" {
            & start $Uri
        }
        "Linux*" {
            Write-Warning "Opening a browser URI on Linux is untested!"
            & xdg-open $Uri
        }
        default {
            & start $Uri
        }
    }
}