Script pour la configuration de IIS pour un prefered erver
Installation de IIS (necessite un reboot)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
Set cmddism=dism Set cmdwusa=wusa Set cmdpowershell=powershell Set cmdreg=reg Set cmdpowercfg=powercfg Set cmdcscript=cscript Set cmdNet=net if defined PROCESSOR_ARCHITEW6432 Set cmddism=%SystemRoot%\Sysnative\cmd.exe /c Dism if defined PROCESSOR_ARCHITEW6432 Set cmdpowershell=%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe if defined PROCESSOR_ARCHITEW6432 Set cmdwusa=%SystemRoot%\sysnative\wusa.exe if defined PROCESSOR_ARCHITEW6432 Set cmdreg=%SystemRoot%\sysnative\reg.exe if defined PROCESSOR_ARCHITEW6432 Set cmdpowercfg=%SystemRoot%\Sysnative\cmd.exe /c powercfg if defined PROCESSOR_ARCHITEW6432 Set cmdcscript=%SystemRoot%\Sysnative\cscript.exe if defined PROCESSOR_ARCHITEW6432 Set cmdNet=%SystemRoot%\Sysnative\cmd.exe /c net :: Enabling IIS: %cmddism% /online /Enable-Feature /FeatureName:IIS-WebServerRole /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-WebServerManagementTools /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-NetFxExtensibility /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-ISAPIExtensions /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-ASP /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-ISAPIFilter /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-ASPNET /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-CGI /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-ServerSideIncludes /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-HttpRedirect /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-WebDAV /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-BasicAuthentication /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-ClientCertificateMappingAuthentication /NoRestart /All %cmddism% /online /Enable-Feature /FeatureName:IIS-WindowsAuthentication /NoRestart /All |
Configuration de IIS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
Set cmddism=dism Set cmdwusa=wusa Set cmdpowershell=powershell Set cmdreg=reg Set cmdpowercfg=powercfg Set cmdcscript=cscript Set cmdNet=net if defined PROCESSOR_ARCHITEW6432 Set cmddism=%SystemRoot%\Sysnative\cmd.exe /c Dism if defined PROCESSOR_ARCHITEW6432 Set cmdpowershell=%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe if defined PROCESSOR_ARCHITEW6432 Set cmdwusa=%SystemRoot%\sysnative\wusa.exe if defined PROCESSOR_ARCHITEW6432 Set cmdreg=%SystemRoot%\sysnative\reg.exe if defined PROCESSOR_ARCHITEW6432 Set cmdpowercfg=%SystemRoot%\Sysnative\cmd.exe /c powercfg if defined PROCESSOR_ARCHITEW6432 Set cmdcscript=%SystemRoot%\Sysnative\cscript.exe if defined PROCESSOR_ARCHITEW6432 Set cmdNet=%SystemRoot%\Sysnative\cmd.exe /c net %cmdNet% share partage /delete /y %cmdNet% share partage=c:\partage /GRANT:Everyone,FULL :: Add MIME types: %windir%\system32\inetsrv\appcmd set config /section:staticContent /+"[fileExtension='.',mimeType='application/octet-stream']" %windir%\system32\inetsrv\appcmd set config /section:staticContent /+"[fileExtension='.*',mimeType='application/octet-stream']" md "%programfiles(x86)%"\landesk\PreferredServer %SYSTEMROOT%\System32\inetsrv\appcmd add app /site.name:"Default Web Site" /path:/landesk /physicalpath:"C:\program files (x86)\landesk\PreferredServer" %SYSTEMROOT%\System32\inetsrv\appcmd add vdir /app.name:"Default Web Site/landesk" /path:/vboot /physicalpath:"C:\Program Files (x86)\LANDesk\PXE\System\images\Boot" %SYSTEMROOT%\System32\inetsrv\appcmd set config /section:directoryBrowse /enabled:true C:\Windows\System32\ICACLS.exe "%ProgramFiles(x86)%"\LANDesk\PXE\System\images\Boot /grant iusr:(RX) C:\Windows\System32\ICACLS.exe "%ProgramFiles(x86)%"\LANDesk\PXE\System\images\Boot /grant iusr:(OI)(CI)(IO)(GR,GE) C:\Windows\System32\ICACLS.exe "%ProgramFiles(x86)%"\LANDesk\PXE\System\images\Boot /grant "Network Service":(OI)(CI)(F) C:\Windows\System32\ICACLS.exe "%ProgramFiles(x86)%"\LANDesk\PXE\System\images\Boot /grant SYSTEM:(OI)(CI)(F) C:\Windows\System32\ICACLS.exe "%ProgramFiles(x86)%"\LANDesk\PXE\System\images\Boot /grant Everyone:(RX) C:\Windows\System32\ICACLS.exe "%ProgramFiles(x86)%"\LANDesk\PXE\System\images\Boot /grant Everyone:(OI)(CI)(IO)(GR,GE) :: virtual directory If EXIST c:\partage %SYSTEMROOT%\System32\inetsrv\appcmd add app /site.name:"Default Web Site" /path:/partage /physicalpath:"c:\partage" %SYSTEMROOT%\System32\inetsrv\appcmd set config /section:directoryBrowse /enabled:true :: autoriser les extensions %SYSTEMROOT%\System32\inetsrv\appcmd set config /section:requestfiltering /-fileExtensions.[fileextension='.resources'] %SYSTEMROOT%\System32\inetsrv\appcmd set config /section:requestfiltering /-fileExtensions.[fileextension='.config'] %SYSTEMROOT%\System32\inetsrv\appcmd set config /section:requestfiltering /-fileExtensions.[fileextension='.cer'] %SYSTEMROOT%\System32\inetsrv\appcmd set config /section:requestfiltering /-fileExtensions.[fileextension='.cs'] %SYSTEMROOT%\System32\inetsrv\appcmd set config /section:requestfiltering /-fileExtensions.[fileextension='.resx'] %SYSTEMROOT%\System32\inetsrv\appcmd set config /section:requestfiltering /-fileExtensions.[fileextension='.csproj'] |
Cet article n'a pas été revu depuis la publication.
Cet article a été créé par david le 27 septembre 2018.
Laisser un commentaire