@echo off :: /======================================================================= :: /= :: /= GetSID.cmd :: /= :: /= AUTHOR: Jake Bentz :: /= DATE: 07/3/2012 :: /= :: /= REQUIREMENTS: psgetsid.exe :: /= :: /= REVISION HISTORY :: /= VER DATE AUTHOR/EDITOR COMMENT :: /= 1.0 07/3/2012 Jake Bentz Created script :: /= :: /======================================================================= setlocal :: -- Set version number set SCRIPT_VER=1.0 set SYNTAX=Syntax: GetSID.cmd [ServerList] :: -- Check for arguments :: -- If your script has a simple syntax this is an easy way to present :: -- help text. if (%1) EQU (/?) echo %SYNTAX% & goto END if /i (%1) EQU (/h) echo %SYNTAX% & goto END if (%1) EQU (?) echo %SYNTAX% & goto END if (%1) EQU (-?) echo %SYNTAX% & goto END if /i (%1) EQU (-h) echo %SYNTAX% & goto END :: -- Set variables if (%1) EQU () echo ERROR: Missing Server List! & echo %SYNTAX% & goto END set ServerList=%1 set Logfile=GetSidOutput_%ServerList%.txt goto MAIN :MAIN echo.>>%LogFile% for /f %%a in (%ServerList%) do ( psgetsid \\%%a >> %Logfile% ) :END
Comments
0 B
|👍
/👎