Friday, February 28, 2014

Make sure you're clear to change your password

The following script I use to verify that I am not logged in anywhere else before I change my domain password.

@echo off
set me=logon

for /F %%S in (myservers.txt) do (@echo %%S && @query session /SERVER:%%S | find "%me%")

  • Change `me` to your domain logon
  • create myservers.txt with a list of the servers you want to limit your search to, then save it in the same folder as this script.

No comments:

Post a Comment

Reflecting on Service

I was US Army Airborne Field Artillery - Target Acquisition. I never was in combat, so I don't think of myself as a veteran, but I do th...