Update Veeam-Services-Control.cmd
This commit is contained in:
@@ -21,9 +21,9 @@ if "%errorlevel%"=="3" (
|
|||||||
set start=true
|
set start=true
|
||||||
)
|
)
|
||||||
|
|
||||||
for /f "tokens=2" %%? in ('sc query type^= service state^= all^|find /i "veeam"^|find /i /v "sqlagent"^|find /i "postgresql-x64-15"') do net %switch% /y "%%?"
|
for /f "tokens=2" %%? in ('sc query type^= service state^= all^|find /i "veeam"^|find /i "service_name"^|find /i /v "sqlagent"^|find /i /v "postgresql-x64-15"^|find /i /v "veeam.archiver"') do net %switch% /y "%%?"
|
||||||
if "%switch%"=="stop" for /f "tokens=3*" %%? in ('tasklist /fo list^|find /i "veeam"') do taskkill /f /im "%%?"
|
if "%switch%"=="stop" for /f "tokens=3*" %%? in ('tasklist /fo list^|find /i "veeam"^|find /i /v "veeam.archiver"') do taskkill /f /im "%%?"
|
||||||
if "%start%"=="true" for /f "tokens=2" %%? in ('sc query type^= service state^= all^|find /i "veeam"^|find /i /v "sqlagent"^|find /i "postgresql-x64-15"') do net start /y "%%?"
|
if "%start%"=="true" for /f "tokens=2" %%? in ('sc query type^= service state^= all^|find /i "veeam"^|find /i "service_name"^|find /i /v "sqlagent"^|find /i /v "postgresql-x64-15"^|find /i /v "veeam.archiver"') do net start /y "%%?"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
#pause
|
#pause
|
||||||
|
|||||||
Reference in New Issue
Block a user