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>
72 lines
2.1 KiB
PowerShell
72 lines
2.1 KiB
PowerShell
# Copy DOS batch files to AD2
|
|
# Destination: \\AD2\test\COMMON\ProdSW
|
|
|
|
$Source = "D:\ClaudeTools"
|
|
$Destination = "\\192.168.0.6\C$\Shares\test\COMMON\ProdSW"
|
|
$Username = "INTRANET\sysadmin"
|
|
$Password = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force
|
|
$Cred = New-Object System.Management.Automation.PSCredential($Username, $Password)
|
|
|
|
# Files to copy
|
|
$Files = @(
|
|
"NWTOC.BAT",
|
|
"CTONW.BAT",
|
|
"UPDATE.BAT",
|
|
"STAGE.BAT",
|
|
"REBOOT.BAT",
|
|
"CHECKUPD.BAT",
|
|
"DEPLOY.BAT"
|
|
)
|
|
|
|
Write-Host "Connecting to AD2..."
|
|
|
|
# Test connection first
|
|
try {
|
|
New-PSDrive -Name TEMP_AD2 -PSProvider FileSystem -Root "\\192.168.0.6\C$" -Credential $Cred -ErrorAction Stop | Out-Null
|
|
Write-Host "[OK] Connected to AD2 C$ share"
|
|
|
|
# Copy to both COMMON and _COMMON locations (sync script checks both)
|
|
$destinations = @(
|
|
"TEMP_AD2:\Shares\test\COMMON\ProdSW",
|
|
"TEMP_AD2:\Shares\test\_COMMON\ProdSW"
|
|
)
|
|
|
|
foreach ($destBase in $destinations) {
|
|
Write-Host ""
|
|
Write-Host "Checking: $destBase"
|
|
|
|
# Create directory if it doesn't exist
|
|
if (-not (Test-Path $destBase)) {
|
|
Write-Host " Creating directory: $destBase"
|
|
New-Item -ItemType Directory -Path $destBase -Force | Out-Null
|
|
}
|
|
|
|
Write-Host " [OK] Destination exists"
|
|
|
|
# Copy each file
|
|
foreach ($file in $Files) {
|
|
$sourcePath = Join-Path $Source $file
|
|
$destPath = Join-Path $destBase $file
|
|
|
|
if (Test-Path $sourcePath) {
|
|
Write-Host " Copying: $file"
|
|
Copy-Item -Path $sourcePath -Destination $destPath -Force
|
|
Write-Host " [OK] $file copied"
|
|
} else {
|
|
Write-Host " [ERROR] Source file not found: $sourcePath"
|
|
}
|
|
}
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "[SUCCESS] All files copied to AD2"
|
|
Write-Host "Files copied to both COMMON and _COMMON"
|
|
Write-Host "Files will sync to NAS within 15 minutes"
|
|
|
|
Remove-PSDrive TEMP_AD2
|
|
|
|
} catch {
|
|
Write-Host "[ERROR] Failed to connect to AD2: $_"
|
|
exit 1
|
|
}
|