check whether Hyper-V is Running / Stopped or not


hello,

is there way check whether hyper-v running / stopped in remote machine using wmi query.

thanks

copy , paste following code in notepad, save hvq.bat

@echo off

sc \\%1 query vmms > nul

if %errorlevel%==0 goto ok

if %errorlevel%==1060 goto no

if %errorlevel%==1722 goto fail

:ok

echo hyper-v role installed on %1: yes

goto end

:no

echo hyper-v role installed on %1: no

goto end

:fail

%1 did not respond

:end

usage: hvq servername

this script should tell whether hyper-v installed or not on remote computer.




Windows Server  >  Hyper-V



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

difference between wuauclt1.exe and wuauclt.exe

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL