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>
This commit is contained in:
56
setup-utilities/Deploy-AssetCollectionSchedule.bat
Normal file
56
setup-utilities/Deploy-AssetCollectionSchedule.bat
Normal file
@@ -0,0 +1,56 @@
|
||||
@echo off
|
||||
REM Deploy-AssetCollectionSchedule.bat
|
||||
REM Deploys the automated asset collection scheduled task on Windows machines
|
||||
REM This batch file can be run via Group Policy or deployment tools
|
||||
|
||||
echo =====================================
|
||||
echo GE Asset Collection - Schedule Deployment
|
||||
echo =====================================
|
||||
echo.
|
||||
|
||||
REM Check if running as administrator
|
||||
net session >nul 2>&1
|
||||
if %errorLevel% neq 0 (
|
||||
echo [ERROR] This script must be run as Administrator
|
||||
echo Please run with elevated privileges
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Check if PowerShell is available
|
||||
powershell.exe -Command "Get-Host" >nul 2>&1
|
||||
if %errorLevel% neq 0 (
|
||||
echo [ERROR] PowerShell is not available on this system
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Installing automated asset collection schedule...
|
||||
echo.
|
||||
|
||||
REM Run the PowerShell installer script
|
||||
powershell.exe -ExecutionPolicy Bypass -File "S:\DT\adata\script\Install-AssetCollectionSchedule.ps1"
|
||||
|
||||
if %errorLevel% equ 0 (
|
||||
echo.
|
||||
echo [SUCCESS] Automated asset collection schedule installed successfully!
|
||||
echo The system will now collect asset data 4 times daily in the background.
|
||||
echo.
|
||||
echo Schedule:
|
||||
echo - 6:00 AM daily
|
||||
echo - 12:00 PM daily
|
||||
echo - 6:00 PM daily
|
||||
echo - 12:00 AM daily
|
||||
echo.
|
||||
echo Users will not be interrupted during collection.
|
||||
) else (
|
||||
echo.
|
||||
echo [ERROR] Failed to install scheduled task
|
||||
echo Please check the PowerShell output above for details
|
||||
)
|
||||
|
||||
echo.
|
||||
echo =====================================
|
||||
echo Deployment Complete
|
||||
echo =====================================
|
||||
pause
|
||||
Reference in New Issue
Block a user