Files
claudetools/clients/dataforth/scripts/check-bat-on-nas.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

39 lines
1.6 KiB
PowerShell

# Verify BAT files are on the NAS
$password = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential("INTRANET\sysadmin", $password)
Write-Host "=== Checking BAT Files on NAS ===" -ForegroundColor Cyan
Write-Host ""
Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock {
$SSH = "C:\Program Files\OpenSSH\ssh.exe"
$NAS_IP = "192.168.0.9"
$NAS_USER = "admin"
Write-Host "[1] Listing root BAT files on NAS" -ForegroundColor Yellow
Write-Host "=" * 80 -ForegroundColor Gray
$result = & $SSH -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile="C:\Shares\test\scripts\.ssh\known_hosts" "${NAS_USER}@${NAS_IP}" "ls -lh /volume1/test/*.BAT 2>/dev/null" 2>&1
if ($LASTEXITCODE -eq 0) {
$result | ForEach-Object { Write-Host " $_" -ForegroundColor Gray }
} else {
Write-Host "[INFO] No BAT files found or connection issue" -ForegroundColor Yellow
}
Write-Host ""
Write-Host "[2] Listing COMMON/DOS files on NAS" -ForegroundColor Yellow
Write-Host "=" * 80 -ForegroundColor Gray
$result = & $SSH -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile="C:\Shares\test\scripts\.ssh\known_hosts" "${NAS_USER}@${NAS_IP}" "ls -lh /volume1/test/COMMON/DOS/*.BAT 2>/dev/null" 2>&1
if ($LASTEXITCODE -eq 0) {
$result | ForEach-Object { Write-Host " $_" -ForegroundColor Gray }
} else {
Write-Host "[INFO] No files in COMMON/DOS or directory doesn't exist" -ForegroundColor Yellow
}
}
Write-Host ""
Write-Host "=== Check Complete ===" -ForegroundColor Cyan