Public/Get-O365Jwt.ps1
Function Get-O365Jwt { Param ( # [Parameter()] [String] $Location = (Join-Path $HOME ".psdtx"), # [Parameter()] [Switch] $Decode ) $Content = Get-Content -Path $Location -Encoding utf8 -Raw if($Content){ $script:O365Jwt = $Content if($Decode){ Get-O365JwtPayload -JwtToken $script:O365Jwt }else{ Write-Output $script:O365Jwt } } } |