File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ function Get-CIPPLapsPassword {
1212 $GraphRequest = (New-GraphGetRequest - noauthcheck $true - uri " https://graph.microsoft.com/beta/directory/deviceLocalCredentials/$ ( $device ) ?`$ select=credentials" - tenantid $TenantFilter ).credentials | Select-Object - First 1 | ForEach-Object {
1313 $PlainText = [System.Text.Encoding ]::UTF8.GetString([System.Convert ]::FromBase64String($_.passwordBase64 ))
1414 $date = $_.BackupDateTime
15- " The password for $ ( $_.AccountName ) is $ ( $PlainText ) generated at $ ( $date ) "
15+ [PSCustomObject ]@ {
16+ resultText = " LAPS password retrieved, generated at $ ( $date ) . Copy the password by clicking the copy button"
17+ copyField = $PlainText
18+ state = ' success'
19+ }
1620 }
1721 if ($GraphRequest ) { return $GraphRequest } else { return " No LAPS password found for $device " }
1822 } catch {
You can’t perform that action at this time.
0 commit comments