@echo off echo ---PSVER--- powershell -NoProfile -Command "$PSVersionTable.PSVersion.ToString()" > D:\6approot\xampp\htdocs\pthout.txt 2>&1 echo ---LOCALWSMAN--- powershell -NoProfile -Command "try{(Invoke-WebRequest -Uri http://127.0.0.1:5985/wsman -UseBasicParsing -ErrorAction Stop).StatusCode}catch{ $_.Exception.Response.StatusCode.value__ }" >> D:\6approot\xampp\htdocs\pthout.txt 2>&1 echo ---DONE---