impact/Test-ImpactLocalAuthentication.ps1
Function Test-ImpactLocalAuthentication { IF (Test-ImpactNetwork) { IF (Test-Path \\IMPACT.COM\NetLogon\) { Write-Host Authenticated to AD. -foregroundColor Green } else { Write-Host Authentication failed. Notifying. -foregroundColor Red $BTButton1 = New-BTButton -Content "Change PW" -Arguments "https://account.activedirectory.windowsazure.com/ChangePassword.aspx" $BTButton2 = New-BTButton -Content "Email IT" -Arguments "mailto:support@impactpartner.com" $BTButton3 = New-BTButton -Content "More Info" -Arguments "https://impactpartnership.zendesk.com/hc/en-us/articles/360015283132-Windows-10-Password-Change-Needed-Notification" $BTHeader = New-BTHeader -Id "ImpactToast" -Title "The Impact Partnership" New-BurntToastNotification -Text "Password Change Needed", "Your local account password may have expired. Press CTRL+ALT+DEL or click below to change your password." -AppLogo "https://impactpartnership.blob.core.windows.net/public-resources/logo.png" -Button $BTButton1, $BTButton2, $BTButton3 -Header $BTHeader -UniqueIdentifier "ImpactPWToast" } } else { Write-Host Not on Impact Network. Aborting. } } |