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

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2