Siamo in procinto di spostare oltre 100 domini su un nuovo server. Ho creato uno script che consentirà di aggiungere una voce del sito Web e una voce FTP in IIS 7 utilizzando un semplice file BAT. Ho trovato diversi tutorial usando AppCmd ADD SITE che funziona molto bene. Eseguendo :: c: \ scripts \ createIIS.bat youdomainname.com. Qualche feed-back? - Funziona.Aggiunta di sito Web e FTP in IIS 7 tramite script
@Echo off
:: --------------------------------------------
:: Create IIS 7 Site Entry/FTP Site
:: --------------------------------------------
:: Get variable from command %1 Root Domain Name.
set rootDomainName = %1
:: This is the path to the Web Pages on the server.
set WebFile=C:\websites\
:: ADD NEW Directory
MKDIR %WebFile%%1
:: ADD IIS ENTRY
%windir%\system32\inetsrv\AppCmd ADD SITE /name:%1 /bindings:http/*:80:%1,http/*:80:www.%1 /physicalPath:C:\websites\%1
:: --------------------------------------------
:: CREATE FTP in IIS
:: --------------------------------------------
%windir%\system32\inetsrv\AppCmd add vdir /app.name:"Default FTP Site/" /path:/%1 /physicalPath:"%WebFile%%1"
echo New Directory Created: %WebFile%%1
echo IIS Website Created: %1 and www.%1
echo FTP SITE Created: %1
echo ...
echo ...
echo COMPLETED!
pause