@echo off REM Install-Schedule.bat REM Simple batch file to install the asset collection scheduled task REM Runs PowerShell with bypass policy to avoid execution restrictions echo ===================================== echo Installing Asset Collection Schedule echo ===================================== echo. REM Check if running as administrator net session >nul 2>&1 if %errorLevel% neq 0 ( echo [ERROR] Must run as Administrator echo Right-click this file and select "Run as administrator" pause exit /b 1 ) echo Running PowerShell installer... echo. REM Run PowerShell with bypass policy powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "%~dp0Install-AssetCollectionSchedule.ps1" if %errorLevel% equ 0 ( echo. echo [SUCCESS] Asset collection schedule installed! echo Your machine will now collect asset data 4 times daily. ) else ( echo. echo [ERROR] Installation failed ) echo. pause