Can someone help me with backup of IIS on multiple servers from powershell script remotely. I can take backup of IIS from powershell command.
backup-webconfiguration -name IIS_backup.
Also i have a batch script which takes backup but that works only for one server . I have to login locally and run this as a batch job.
@echo off
cls
pushd "%WinDir%\System32\inetsrv"
echo.| date | find /i "current">datetime1.tmp
echo.| time | find /i "current">datetime2.tmp
for /f "tokens=1,2,3,4,5,6" %%i in (datetime1.tmp) do (
echo %%n>datetime1.tmp
)
for /f "tokens=1,2,3,4,5,6" %%i in (datetime2.tmp) do (
echo %%m>datetime2.tmp
)
for /f "delims=/ tokens=1,2,3" %%i in (datetime1.tmp) do (
set TMPDATETIME=%%k%%i%%j
)
for /f "delims=:. tokens=1,2,3,4" %%i in (datetime2.tmp) do (
set TMPDATETIME=D%TMPDATETIME%T%%i%%j%%k%%l
)
appcmd add backups %TMPDATETIME%
del datetime1.tmp
del datetime2.tmp
set TMPDATETIME=
popd
echo.
Currently i have worked on these two scripts . If possible please help me with taking backup of IIS remotely on multiple servers either through powershell or batch file.