Tuesday, October 28, 2008

A batch file with datatime attribute for backup Alternate Access Mappings

Here show you a batch script for backing up AAM

c:
cd\
cls
@echo Backup Alternate Access Mappings
@for /f "tokens=2" %%i in ('date /t') do
@set thedate=%%i
@set mm=%thedate:~0,2%
@set dd=%thedate:~3,2%
@set yyyy=%thedate:~6,4%
stsadm -o enumalternatedomains >>
E:\data\Backup\AAM\AlternateAccessMappings_%mm%%dd%%yyyy%.txt
@echo Done

No comments: