Você também pode usar o pkgmgr com um arquivo autônomo para instalar uma função com um conjunto personalizado de recursos subordinados:
pkgmgr /n:\somesserver\someshare\unattend\IISUnattend.xml
O arquivo autônomo é parecido com:
<?xml version="1.0"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<servicing>
<package action="configure">
<assemblyIdentity
name="Microsoft-Windows-Foundation-Package"
version="6.0.6001.18000"
language="neutral"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
versionScope="nonSxS"
/>
<selection name="IIS-WebServerRole" state="true"/>
<selection name="IIS-WebServer" state="true"/>
<selection name="IIS-CommonHttpFeatures" state="true"/>
<selection name="IIS-StaticContent" state="true"/>
<selection name="IIS-DefaultDocument" state="true"/>
<selection name="IIS-DirectoryBrowsing" state="true"/>
<selection name="IIS-HttpErrors" state="true"/>
<selection name="IIS-HttpRedirect" state="true"/>
<selection name="IIS-ApplicationDevelopment" state="true"/>
<selection name="IIS-ASPNET" state="true"/>
<selection name="IIS-NetFxExtensibility" state="true"/>
<selection name="IIS-ASP" state="true"/>
<selection name="IIS-CGI" state="true"/>
<selection name="IIS-ISAPIExtensions" state="true"/>
<selection name="IIS-ISAPIFilter" state="true"/>
<selection name="IIS-ServerSideIncludes" state="true"/>
<selection name="IIS-HealthAndDiagnostics" state="true"/>
<selection name="IIS-HttpLogging" state="true"/>
<selection name="IIS-LoggingLibraries" state="true"/>
<selection name="IIS-RequestMonitor" state="true"/>
<selection name="IIS-HttpTracing" state="true"/>
<selection name="IIS-CustomLogging" state="true"/>
<selection name="IIS-ODBCLogging" state="true"/>
<selection name="IIS-Security" state="true"/>
<selection name="IIS-BasicAuthentication" state="true"/>
<selection name="IIS-WindowsAuthentication" state="true"/>
<selection name="IIS-DigestAuthentication" state="true"/>
<selection name="IIS-ClientCertificateMappingAuthentication" state="true"/>
<selection name="IIS-IISCertificateMappingAuthentication" state="true"/>
<selection name="IIS-URLAuthorization" state="true"/>
<selection name="IIS-RequestFiltering" state="true"/>
<selection name="IIS-IPSecurity" state="true"/>
<selection name="IIS-Performance" state="true"/>
<selection name="IIS-HttpCompressionStatic" state="true"/>
<selection name="IIS-HttpCompressionDynamic" state="true"/>
<selection name="IIS-WebServerManagementTools" state="true"/>
<selection name="IIS-ManagementConsole" state="true"/>
<selection name="IIS-ManagementScriptingTools" state="true"/>
<selection name="IIS-ManagementService" state="true"/>
<selection name="IIS-IIS6ManagementCompatibility" state="true"/>
<selection name="IIS-Metabase" state="true"/>
<selection name="IIS-WMICompatibility" state="true"/>
<selection name="IIS-LegacyScripts" state="true"/>
<selection name="IIS-LegacySnapIn" state="true"/>
<selection name="WAS-WindowsActivationService" state="true"/>
<selection name="WAS-ProcessModel" state="true"/>
<selection name="WAS-NetFxEnvironment" state="true"/>
<selection name="WAS-ConfigurationAPI" state="true"/>
</package>
</servicing>
</unattend>
Eu usei o Gerenciador de Imagem de Sistema do Windows da WAIK para ajudar a criar o arquivo autônomo. Novamente, isso precisaria ser incluído em um script de inicialização.