UPDATE:
Ok below is the current code I wrote up but it errors out saying ERROR: The RPC server is unavailable
If I manually just type in taskkill /s cn /im csmmviewer.exe
within cmd it works, what I'm I missing here?
@echo off
:start
set /p "cn=Enter the computer name "
echo.
set /p "question=You will now close csmmviewer.exe on %cn% are you sure? [Y/N] "
echo.
if /I "%question%" EQU "Y" goto :run
if /I "%question%" EQU "N" goto :start
:run
taskkill /s cn /im csmmviewer.exe
set /p "again=Do you have another computer name? [Y/N] "
echo.
if /I "%again%" EQU "Y" goto :start
if /I "%again%" EQU "N" goto :exit
Hello noob here looking for some much needed help please.
At my job I run into this issue where too many people log into an application and when users that really need to use it can’t because too many people are logged into it (using up all the licenses) and I have to start kicking them off by killing the app remotely. The below command works every time but I have to manually copy and paste it into the command prompt and replace PCJXXXXX with the actual computer name. I will like to create a .bat file or .cmd file that I can just double click on which will then just ask to enter the computer name which I would just then enter and it runs the full command to end the task.
My script:
taskkill /s pcjXXXXX /u domain_name\admin /im csmmviewer.exe
XXXXX is what I delete and enter the actual name, can anyone help, if you need more details please let me know your questions?