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>
53 lines
1.9 KiB
PowerShell
53 lines
1.9 KiB
PowerShell
# Test WinRM Connection to AD2
|
|
Write-Host "[INFO] Testing WinRM connection to AD2..."
|
|
|
|
# Admin account test
|
|
Write-Host "`n[TEST 1] Admin Account (INTRANET\sysadmin)"
|
|
$adminPassword = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force
|
|
$adminCred = New-Object System.Management.Automation.PSCredential("INTRANET\sysadmin", $adminPassword)
|
|
|
|
try {
|
|
$result = Invoke-Command -ComputerName 192.168.0.6 -Credential $adminCred -ScriptBlock {
|
|
@{
|
|
Computer = $env:COMPUTERNAME
|
|
Domain = $env:USERDOMAIN
|
|
User = $env:USERNAME
|
|
WinRM = (Get-Service WinRM).Status
|
|
}
|
|
} -ErrorAction Stop
|
|
|
|
Write-Host "[SUCCESS] Connected to AD2" -ForegroundColor Green
|
|
Write-Host " Computer: $($result.Computer)"
|
|
Write-Host " Domain: $($result.Domain)"
|
|
Write-Host " User: $($result.User)"
|
|
Write-Host " WinRM Status: $($result.WinRM)"
|
|
} catch {
|
|
Write-Host "[ERROR] $($_.Exception.Message)" -ForegroundColor Red
|
|
}
|
|
|
|
# Service account test
|
|
Write-Host "`n[TEST 2] Service Account (INTRANET\ClaudeTools-ReadOnly)"
|
|
$svcPassword = ConvertTo-SecureString "vG!UCAD>=#gIk}1A3=:{+DV3" -AsPlainText -Force
|
|
$svcCred = New-Object System.Management.Automation.PSCredential("INTRANET\ClaudeTools-ReadOnly", $svcPassword)
|
|
|
|
try {
|
|
$result = Invoke-Command -ComputerName 192.168.0.6 -Credential $svcCred -ScriptBlock {
|
|
@{
|
|
Computer = $env:COMPUTERNAME
|
|
Domain = $env:USERDOMAIN
|
|
User = $env:USERNAME
|
|
UserCount = (Get-ADUser -Filter * | Measure-Object).Count
|
|
}
|
|
} -ErrorAction Stop
|
|
|
|
Write-Host "[SUCCESS] Connected to AD2" -ForegroundColor Green
|
|
Write-Host " Computer: $($result.Computer)"
|
|
Write-Host " Domain: $($result.Domain)"
|
|
Write-Host " User: $($result.User)"
|
|
Write-Host " AD Users Found: $($result.UserCount)"
|
|
} catch {
|
|
Write-Host "[ERROR] $($_.Exception.Message)" -ForegroundColor Red
|
|
}
|
|
|
|
Write-Host "`n[INFO] Testing complete."
|