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>
54 lines
1.8 KiB
PowerShell
54 lines
1.8 KiB
PowerShell
# Check DEPLOY.BAT and UPDATE.BAT on AD2
|
|
|
|
$Username = "INTRANET\sysadmin"
|
|
$Password = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force
|
|
$Cred = New-Object System.Management.Automation.PSCredential($Username, $Password)
|
|
|
|
Write-Host "[INFO] Connecting to AD2..."
|
|
|
|
New-PSDrive -Name TEMP_AD2 -PSProvider FileSystem -Root "\\192.168.0.6\C$" -Credential $Cred -ErrorAction Stop | Out-Null
|
|
|
|
Write-Host "[INFO] Checking DEPLOY.BAT and UPDATE.BAT..."
|
|
Write-Host ""
|
|
|
|
$DeployFile = Get-Item "TEMP_AD2:\Shares\test\DEPLOY.BAT" -ErrorAction SilentlyContinue
|
|
$UpdateFile = Get-Item "TEMP_AD2:\Shares\test\UPDATE.BAT" -ErrorAction SilentlyContinue
|
|
|
|
if ($DeployFile) {
|
|
Write-Host "[OK] DEPLOY.BAT found on AD2"
|
|
Write-Host " Last Modified: $($DeployFile.LastWriteTime)"
|
|
Write-Host " Size: $($DeployFile.Length) bytes"
|
|
|
|
# Check line endings
|
|
$Content = Get-Content "TEMP_AD2:\Shares\test\DEPLOY.BAT" -Raw
|
|
if ($Content -match "`r`n") {
|
|
Write-Host " Line Endings: CRLF (DOS-compatible) [OK]"
|
|
} elseif ($Content -match "`n") {
|
|
Write-Host " Line Endings: LF only [WARNING]"
|
|
}
|
|
} else {
|
|
Write-Host "[ERROR] DEPLOY.BAT not found on AD2"
|
|
}
|
|
|
|
Write-Host ""
|
|
|
|
if ($UpdateFile) {
|
|
Write-Host "[OK] UPDATE.BAT found on AD2"
|
|
Write-Host " Last Modified: $($UpdateFile.LastWriteTime)"
|
|
Write-Host " Size: $($UpdateFile.Length) bytes"
|
|
|
|
# Check line endings
|
|
$Content = Get-Content "TEMP_AD2:\Shares\test\UPDATE.BAT" -Raw
|
|
if ($Content -match "`r`n") {
|
|
Write-Host " Line Endings: CRLF (DOS-compatible) [OK]"
|
|
} elseif ($Content -match "`n") {
|
|
Write-Host " Line Endings: LF only [WARNING]"
|
|
}
|
|
} else {
|
|
Write-Host "[ERROR] UPDATE.BAT not found on AD2"
|
|
}
|
|
|
|
Remove-PSDrive TEMP_AD2
|
|
Write-Host ""
|
|
Write-Host "[INFO] Note: Files sync to NAS every 15 minutes via AD2's scheduled task"
|