Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

I need to make a script that will be executed on the 2K12R2 directory server and needs to Check both of the Windows 10 workstations for a remote...

I need to make a script that will be executed on the 2K12R2 directory server and needs to

  1. Check both of the Windows 10 workstations for a remote process (Calculator.exe) and kill/terminate the process if it exists.

a. The script should use a for loop that reads in a text file called hosts.txt that contains the hostnames of the Windows 10 workstations

b. The script should use tasklist and taskkill or a wmic query to enumerate the process (Calculator.exe) and kill it.

This is what I have so far but I'm unsure on how to create a for loop to check a text file for the host names.

echo off

tasklist /fi "imagename eq calculator.exe" |find ":" > nul

if errorlevel 1 taskkill /f /im "calculator.exe"&exit

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question