5. 3. 2010

Command line script for remote log off

Sometime i have blue screen (desktop without icons) in remote desktop, when i closed any aplications. So i wrote simple script for logout on remote desktop server.
@echo on
set param=/SERVER:STORAGE
set rdusr=%username%
@echo off
echo.
pause
qwinsta %param%|findstr /i %rdusr% > %TEMP%\RDsessionID.txt
for /f %%f in ('type %TEMP%\RDsessionID.txt') do logoff %%f %param%
I using Windows commands "qwinsta" for getting sessionID of remote desktop and command "logoff" for remote log off user on server.

You can use free. If is this tool usefull, click on any advertise on my page.

Žádné komentáře:

Okomentovat

K vkládání komentáře se můžete přihlásit bez registrace pomocí OpenID na Seznam.cz