1. 程式人生 > >windwos組件自動化安裝-命令行DISM安裝iis和msmq消息隊列

windwos組件自動化安裝-命令行DISM安裝iis和msmq消息隊列

完成 trigger ssm code .exe iis6 ror edi cer

微軟在xp時可以使用ocsetup.exe來安裝部署windows組件,在vista之後推出了pkgmgr命令來安裝windows組件
在win7/windows2008r2之後,新推出了Deployment image serviing and management(Dism.exe)工具,此工具提拱了強大的包安裝功能,不僅可以對已經安裝好並啟動的winows進行組件的安裝部署,還可以對沒有啟動起來的操作系統(比如mount到某個碰盤上的安裝文件wim或vhd文件,對安裝包進行預先部署,這樣可以在安裝完成後,這些組件就自動安裝到系統中了)

比如:
取得已安裝組件列表到文件中,

dism.exe /Online /Get-Features >%~dp0WindowsFeaturesInfo.txt

安裝msmq

Dism.exe /Online /Quiet /NoRestart /Enable-Feature /FeatureName:MSMQ-Container /FeatureName:MSMQ-Server /LimitAccess /FeatureName:MSMQ-Triggers   /FeatureName:MSMQ-ADIntegration /FeatureName:MSMQ-HTTP   /FeatureName:MSMQ-Multicast /FeatureName:MSMQ-DCOMProxy  


安裝iis

dism /Online /Enable-Feature  /FeatureName:IIS
-ApplicationDevelopment /FeatureName:IIS-ASP /FeatureName:IIS-ASPNET /FeatureName:IIS-BasicAuthentication /FeatureName:IIS-CGI /FeatureName:IIS-ClientCertificateMappingAuthentication /FeatureName:IIS-CommonHttpFeatures /FeatureName:IIS-CustomLogging /FeatureName:IIS-DefaultDocument /FeatureName:IIS-DigestAuthentication /FeatureName:IIS
-DirectoryBrowsing /FeatureName:IIS-FTPExtensibility /FeatureName:IIS-FTPServer /FeatureName:IIS-FTPSvc /FeatureName:IIS-HealthAndDiagnostics /FeatureName:IIS-HostableWebCore /FeatureName:IIS-HttpCompressionDynamic /FeatureName:IIS-HttpCompressionStatic /FeatureName:IIS-HttpErrors /FeatureName:IIS-HttpLogging /FeatureName:IIS-HttpRedirect /FeatureName:IIS-HttpTracing /FeatureName:IIS-IIS6ManagementCompatibility /FeatureName:IIS-IISCertificateMappingAuthentication /FeatureName:IIS-IPSecurity /FeatureName:IIS-ISAPIExtensions /FeatureName:IIS-ISAPIFilter /FeatureName:IIS-LegacyScripts /FeatureName:IIS-LegacySnapIn /FeatureName:IIS-LoggingLibraries /FeatureName:IIS-ManagementConsole /FeatureName:IIS-ManagementScriptingTools /FeatureName:IIS-ManagementService /FeatureName:IIS-Metabase /FeatureName:IIS-NetFxExtensibility /FeatureName:IIS-ODBCLogging /FeatureName:IIS-Performance /FeatureName:IIS-RequestFiltering /FeatureName:IIS-RequestMonitor /FeatureName:IIS-Security /FeatureName:IIS-ServerSideIncludes /FeatureName:IIS-StaticContent /FeatureName:IIS-URLAuthorization /FeatureName:IIS-WebDAV /FeatureName:IIS-WebServer /FeatureName:IIS-WebServerManagementTools /FeatureName:IIS-WebServerRole /FeatureName:IIS-WindowsAuthentication /FeatureName:IIS-WMICompatibility /FeatureName:WAS-ConfigurationAPI /FeatureName:WAS-NetFxEnvironment /FeatureName:WAS-ProcessModel /FeatureName:WAS-WindowsActivationService

windwos組件自動化安裝-命令行DISM安裝iis和msmq消息隊列