@echo OFF ::set "DRIVE=%USERPROFILE%" || REM For testing purposes set "DRIVE=D:" || REM The device's drive letter set "DELAY=3" || REM Seconds until the time is set via the device powershell -command "$TIMESTAMP = (Get-Date).AddSeconds(%DELAY%).ToString('yyyyMMddHHmmss'); Write-Output $TIMESTAMP | Out-File '%DRIVE%\TM.txt'" echo Time configuration file created at: %DRIVE%\TM.txt echo Please safely disconnect the device and check if the time is updated.