Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.
Code for stale user accounts:
@echo off setlocal enabledelayedexpansion set LogFile=C:\Tools\staleAdPc.log if not exist "%LogFile%" goto SkipRename for %%f in ("%LogFile%") do ( for /f "tokens=1-3 delims=/ " %%a in ("%%~tf") do (set TimeStamp=%%c%%a%%b) set NewName=%%~nf.old.!TimeStamp!%%~xf echo Renaming "%LogFile%" to "!NewName!" ... ren "%LogFile%" "!NewName!" ECHO File date: %%~tf ) :SkipRename dsquery computer OU=Depts,DC=x -inactive 8 -limit 300 > %logfile% (for /f "tokens=2,3* delims=,=" %%i in (%logfile%) do @echo %%~i) > c:\tools\staleADPc1.log
@echo off setlocal set LogFile=C:\tools\staleADUser1-N.log if exist "%LogFile%" del "%LogFile%" for /f "delims=" %%a in ('dsquery.exe user "OU=Depts,DC=x" -o samid -limit 0 -inactive 8') do ( echo %%~a >>"%LogFile%" echo %%~a )
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
13 Experts available now in Live!