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>
34 lines
1.4 KiB
PowerShell
34 lines
1.4 KiB
PowerShell
# BG Builders - Lesley Exchange steps (run from interactive PowerShell)
|
|
# Adds Shelly as delegate + enables litigation hold
|
|
|
|
$lesleyUPN = "lesley@bgbuildersllc.com"
|
|
$shellyUPN = "Shelly@bgbuildersllc.com"
|
|
|
|
Write-Output "Connecting to Exchange Online..."
|
|
Import-Module ExchangeOnlineManagement
|
|
Connect-ExchangeOnline -UserPrincipalName "sysadmin@bgbuildersllc.com" -ShowBanner:$false
|
|
Write-Output "[OK] Connected"
|
|
|
|
# Add Shelly as delegate
|
|
Write-Output "`nAdding Shelly as delegate..."
|
|
Add-MailboxPermission -Identity $lesleyUPN -User $shellyUPN -AccessRights FullAccess -AutoMapping $true
|
|
Write-Output "[OK] Shelly granted FullAccess"
|
|
|
|
Add-RecipientPermission -Identity $lesleyUPN -Trustee $shellyUPN -AccessRights SendAs -Confirm:$false
|
|
Write-Output "[OK] Shelly granted SendAs"
|
|
|
|
# Enable litigation hold
|
|
Write-Output "`nEnabling litigation hold..."
|
|
Set-Mailbox -Identity $lesleyUPN -LitigationHoldEnabled $true -LitigationHoldDuration Unlimited
|
|
Write-Output "[OK] Litigation hold enabled"
|
|
|
|
# Verify
|
|
Write-Output "`nVerifying permissions..."
|
|
Get-MailboxPermission -Identity $lesleyUPN | Where-Object { $_.User -notlike "NT AUTHORITY*" -and $_.User -notlike "S-1-*" } | Format-Table User,AccessRights -AutoSize
|
|
|
|
Write-Output "`nVerifying litigation hold..."
|
|
Get-Mailbox -Identity $lesleyUPN | Format-List LitigationHoldEnabled,LitigationHoldDuration
|
|
|
|
Disconnect-ExchangeOnline -Confirm:$false
|
|
Write-Output "[OK] Done"
|