I Need To Make A Script That Will Be Executed On The 2k12r2 Directory Server And
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 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
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
