update
This commit is contained in:
@@ -15,12 +15,12 @@ function New-PPTAuth {
|
||||
process {
|
||||
|
||||
$isAuth = $false
|
||||
& $Global:pptConfig.pacPath auth create --cloud UsGovDod --deviceCode | ForEach-Object {
|
||||
& $Global:pptConfig.pacPath auth create --cloud UsGov --deviceCode | ForEach-Object {
|
||||
if ($_ -match 'To sign in, use a web browser to open the page') {
|
||||
Write-Host "[ Info ] " -ForegroundColor Green -nonewline
|
||||
Write-host "$_" -ForegroundColor Cyan
|
||||
Set-Clipboard -Value "$(($_ -split "To sign in, use a web browser to open the page | and enter the code | to authenticate.")[2])"
|
||||
Start-Process microsoft-edge:https://microsoft.com/deviceloginus -OutVariable procout
|
||||
Start-Process microsoft-edge:https://microsoft.com/devicelogin -OutVariable procout
|
||||
} else {
|
||||
if ($_ -match 'authenticated successfully') {
|
||||
$isAuth = $true
|
||||
|
||||
Reference in New Issue
Block a user