Files
powershell-scripts/winrm-https/winrm-ca-scripts/Test-RemotePC-Debug.bat
cproudlock 62c0c7bb06 Initial commit: Organized PowerShell scripts for ShopDB asset collection
Structure:
- asset-collection/: Local PC data collection scripts
- remote-execution/: WinRM remote execution scripts
- setup-utilities/: Configuration and testing utilities
- registry-backup/: GE registry backup scripts
- winrm-https/: WinRM HTTPS certificate setup
- docs/: Complete documentation

Each folder includes a README with detailed documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 10:57:54 -05:00

66 lines
1.7 KiB
Batchfile

@echo off
REM ============================================================================
REM Test-RemotePC-Debug.bat
REM Runs WinRM HTTPS debug test with execution policy bypass
REM ============================================================================
REM Setup logging
set "LOG_DIR=S:\DT\ADATA\SCRIPT\DEPLOY\LOGS"
set "HOSTNAME=%COMPUTERNAME%"
set "TIMESTAMP=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%-%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%"
set "TIMESTAMP=%TIMESTAMP: =0%"
set "LOG_FILE=%LOG_DIR%\%HOSTNAME%-%TIMESTAMP%-DEBUG.txt"
REM Create log directory if it doesn't exist
if not exist "%LOG_DIR%" (
mkdir "%LOG_DIR%" 2>nul
)
echo.
echo ========================================
echo WinRM HTTPS Debug Test
echo ========================================
echo.
echo Computer: %HOSTNAME%
echo Log File: %LOG_FILE%
echo.
REM Check for administrator privileges
net session >nul 2>&1
if %errorLevel% neq 0 (
echo [ERROR] This script requires Administrator privileges.
echo Please right-click and select "Run as Administrator"
echo.
pause
exit /b 1
)
echo [OK] Running with Administrator privileges
echo.
REM Get the directory where this batch file is located
set "SCRIPT_DIR=%~dp0"
REM Check if PowerShell script exists
if not exist "%SCRIPT_DIR%Test-RemotePC-Debug.ps1" (
echo [ERROR] Test-RemotePC-Debug.ps1 not found in script directory
echo.
pause
exit /b 1
)
echo Running debug test...
echo.
REM Execute PowerShell script with bypass and log file
PowerShell.exe -NoProfile -ExecutionPolicy Bypass -Command ^
"& '%SCRIPT_DIR%Test-RemotePC-Debug.ps1' -LogFile '%LOG_FILE%'"
echo.
echo ========================================
echo Test Complete
echo ========================================
echo Log saved to: %LOG_FILE%
echo.
pause