Files
claudetools/clients/internal-infrastructure/scripts/Reset-Password-ExchangeOnline.ps1
Mike Swanson 5cbd49ce24 Reorganize repo: compartmentalize scripts by client/project
Move 150+ scripts from root and scripts/ into client/project directories:
- clients/dataforth/scripts/ (110 files: AD2, sync, SSH, DB, DOS scripts)
- clients/bg-builders/scripts/ (14 files: Lesley mgmt, Exchange, termination)
- clients/internal-infrastructure/scripts/ (10 files: GDAP, Gitea, backups)
- projects/msp-tools/scripts/ (9 files: CIPP, MSP onboarding, Datto)
- projects/gururmm-agent/scripts/ (3 files: API test, JWT, record counts)
- clients/glaztech/scripts/ (1 file: CentraStage removal)

Also reorganized:
- VPN scripts → infrastructure/vpn-configs/
- Retrieved API/JS files → api/
- Forum posts → projects/community-forum/forum-posts/
- SSH docs → clients/internal-infrastructure/docs/
- NWTOC/CTONW docs → projects/wrightstown-smarthome/docs/
- ACG website files → projects/internal/acg-website-2025/
- Dataforth docs → clients/dataforth/docs/
- schema-retrieved.sql → docs/database/

Deleted 24 tmp_*.ps1 one-off debug scripts (preserved in git history).
Root reduced from 220+ files to 62 items (docs + directories only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:15:07 -07:00

82 lines
3.3 KiB
PowerShell

# Reset password for notifications@dataforth.com using Exchange Online
# This works when Microsoft Graph permissions are insufficient
Write-Host "[OK] Resetting password via Azure AD (using web portal method)..." -ForegroundColor Green
Write-Host ""
$UserPrincipalName = "notifications@dataforth.com"
# Generate a strong password
Add-Type -AssemblyName System.Web
$NewPassword = [System.Web.Security.Membership]::GeneratePassword(16, 4)
Write-Host "================================================================"
Write-Host "PASSWORD RESET OPTIONS"
Write-Host "================================================================"
Write-Host ""
Write-Host "[OPTION 1] Use Azure AD Portal (Recommended - Always Works)" -ForegroundColor Cyan
Write-Host ""
Write-Host "1. Open browser to: https://portal.azure.com"
Write-Host "2. Navigate to: Azure Active Directory > Users"
Write-Host "3. Search for: notifications@dataforth.com"
Write-Host "4. Click 'Reset password'"
Write-Host "5. Use this generated password: $NewPassword" -ForegroundColor Yellow
Write-Host "6. UNCHECK 'Make this user change password on first sign in'"
Write-Host ""
Write-Host "[OPTION 2] Use PowerShell with Elevated Admin Account" -ForegroundColor Cyan
Write-Host ""
Write-Host "If you have a Global Admin account, connect to Azure AD:"
Write-Host ""
Write-Host "Install-Module AzureAD -Scope CurrentUser" -ForegroundColor Gray
Write-Host "Connect-AzureAD -TenantId 7dfa3ce8-c496-4b51-ab8d-bd3dcd78b584" -ForegroundColor Gray
Write-Host "`$Password = ConvertTo-SecureString '$NewPassword' -AsPlainText -Force" -ForegroundColor Gray
Write-Host "Set-AzureADUserPassword -ObjectId notifications@dataforth.com -Password `$Password -ForceChangePasswordNextSignIn `$false" -ForegroundColor Gray
Write-Host ""
Write-Host "================================================================"
Write-Host "RECOMMENDED PASSWORD"
Write-Host "================================================================"
Write-Host ""
Write-Host " $NewPassword" -ForegroundColor Yellow
Write-Host ""
Write-Host "SAVE THIS PASSWORD for the website configuration!"
Write-Host ""
# Save to file
$CredPath = "D:\ClaudeTools\dataforth-notifications-NEW-PASSWORD.txt"
@"
Dataforth Notifications Account - PASSWORD RESET
Generated: $(Get-Date -Format "yyyy-MM-dd HH:mm:ss")
Username: notifications@dataforth.com
NEW Password: $NewPassword
IMPORTANT: Password policy is already set to never expire!
You just need to reset the actual password.
SMTP Configuration for Website:
- Server: smtp.office365.com
- Port: 587
- TLS: Yes
- Username: notifications@dataforth.com
- Password: $NewPassword
STATUS:
- Password Never Expires: YES (already configured)
- Password Reset: PENDING (use Azure portal or PowerShell above)
DO NOT COMMIT TO GIT OR SHARE PUBLICLY
"@ | Out-File -FilePath $CredPath -Encoding UTF8
Write-Host "[OK] Instructions and password saved to:" -ForegroundColor Green
Write-Host " $CredPath" -ForegroundColor Cyan
Write-Host ""
Write-Host "================================================================"
Write-Host "AFTER RESETTING PASSWORD"
Write-Host "================================================================"
Write-Host "1. Update website SMTP config with new password"
Write-Host "2. Test: D:\ClaudeTools\Test-DataforthSMTP.ps1"
Write-Host "3. Verify: Get-MessageTrace -SenderAddress notifications@dataforth.com"
Write-Host ""