/build/static/layout/Breadcrumb_cap_w.png

Setting up Windows Features in Post Installation Tasks - Using Windows AFG site

Ran across some helpful commands to help enable and disable features within Windows and I have used these as post installation tasks very successfully in the K2000. Windows 7, 8.1 and 10 may have slightly different options available but this article should provide a framework for some handy post install tasks.

There are a lot of options and a helpful site that can guide you through creating all the options that you might need for Windows 7, 8, and 10 as well as Windows servers.


Using a Post Installation Batch Script and DISM commands

The Syntax will be to use Enable-Feature or Disable-Feature with these commands.  Here is an example of a post install task: 

@echo off
echo Now configuring Windows Features.
dism /Online /Disable-Feature /FeatureName:"DirectPlay" /NoRestart
dism /Online /Disable-Feature /FeatureName:"FaxServicesClientPackage" /NoRestart
dism /Online /Enable-Feature /FeatureName:"LegacyComponents" /NoRestart
dism /Online /Enable-Feature /FeatureName:"MediaPlayback" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-All" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-Management-Clients" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-Management-PowerShell" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Microsoft-Hyper-V-Tools-All" /NoRestart
dism /Online /Enable-Feature /FeatureName:"Printing-Foundation-Features" /NoRestart
dism /Online /Enable-Feature /FeatureName:"Printing-Foundation-InternetPrinting-Client" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Printing-Foundation-LPDPrintService" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Printing-Foundation-LPRPortMonitor" /NoRestart
dism /Online /Enable-Feature /FeatureName:"Printing-PrintToPDFServices-Features" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Printing-XPSServices-Features" /NoRestart
dism /Online /Disable-Feature /FeatureName:"ScanManagementConsole" /NoRestart
dism /Online /Enable-Feature /FeatureName:"SearchEngine-Client-Package" /NoRestart
dism /Online /Enable-Feature /FeatureName:"TelnetClient" /NoRestart
dism /Online /Disable-Feature /FeatureName:"TFTP" /NoRestart
dism /Online /Disable-Feature /FeatureName:"TIFFIFilter" /NoRestart
dism /Online /Enable-Feature /FeatureName:"WindowsMediaPlayer" /NoRestart
dism /Online /Disable-Feature /FeatureName:"WorkFolders-Client" /NoRestart
dism /Online /Disable-Feature /FeatureName:"Xps-Foundation-Xps-Viewer" /NoRestart
echo Windows Features have now been configured.
exit

Windows Power Plan Setup

The Windows Answer file site has nice options for creating the code for Power Plan setup.  http://windowsafg.no-ip.org/power10.html 

Windows Services Setup

The Windows Answer file site again has really robust options for setting services properly. http://windowsafg.no-ip.org/win10services.html

NOTE:  If you are using K1000 (or any other inventory tools for that matter) Make sure you have WMI services enabled otherwise your inventory tool might fail.

An example post install task is here...


@echo off
echo Now configuring services.
sc config AxInstSV start= demand
sc config AJRouter start= demand
sc config AppReadiness start= demand
sc config AppIDSvc start= demand
sc config Appinfo start= demand
sc config ALG start= demand
sc config AppMgmt start= demand
sc config AppXSvc start= demand
sc config BITS start= delayed-auto
sc config BrokerInfrastructure start= auto
sc config BFE start= auto
sc config BDESVC start= demand
sc config wbengine start= demand
sc config BthHFSrv start= demand
sc config bthserv start= demand
sc config PeerDistSvc start= demand
sc config CDPSvc start= demand
sc config CertPropSvc start= demand
sc config ClipSVC start= demand
sc config KeyIso start= demand
sc config EventSystem start= auto
sc config COMSysApp start= demand
sc config Browser start= demand
sc config CoreMessagingRegistrar start= auto
sc config VaultSvc start= demand
sc config CryptSvc start= auto
sc config DsSvc start= demand
sc config DcpSvc start= demand
sc config DcomLaunch start= auto
sc config DoSvc start= delayed-auto
sc config DeviceAssociationService start= demand
sc config DeviceInstall start= demand
sc config DmEnrollmentSvc start= demand
sc config DsmSvc start= demand
sc config DevQueryBroker start= demand
sc config Dhcp start= auto
sc config DPS start= auto
sc config WdiServiceHost start= demand
sc config WdiSystemHost start= demand
sc config DiagTrack start= disabled
sc config TrkWks start= auto
sc config MSDTC start= demand
sc config dmwappushservice start= disabled
sc config Dnscache start= auto
sc config MapsBroker start= delayed-auto
sc config embeddedmode start= demand
sc config EFS start= demand
sc config EntAppSvc start= demand
sc config EapHost start= demand
sc config Fax start= demand
sc config fhsvc start= demand
sc config fdPHost start= demand
sc config FDResPub start= demand
sc config lfsvc start= demand
sc config gpsvc start= auto
sc config HomeGroupListener start= demand
sc config HomeGroupProvider start= demand
sc config hidserv start= demand
sc config vmickvpexchange start= demand
sc config vmicguestinterface start= demand
sc config vmicshutdown start= demand
sc config vmicheartbeat start= demand
sc config vmicrdv start= demand
sc config vmictimesync start= demand
sc config vmicvmsession start= demand
sc config vmicvss start= demand
sc config IKEEXT start= demand
sc config UI0Detect start= demand
sc config SharedAccess start= demand
sc config IEEtwCollectorService start= demand
sc config iphlpsvc start= auto
sc config PolicyAgent start= demand
sc config KtmRm start= demand
sc config lltdsvc start= demand
sc config LSM start= auto
sc config diagnosticshub.standardcollector.service start= demand
sc config wlidsvc start= demand
sc config MSiSCSI start= demand
sc config NgcSvc start= demand
sc config NgcCtnrSvc start= demand
sc config swprv start= demand
sc config smphost start= demand
sc config SmsRouter start= demand
sc config NetTcpPortSharing start= disabled
sc config Netlogon start= demand
sc config NcdAutoSetup start= demand
sc config NcbService start= demand
sc config Netman start= demand
sc config NcaSvc start= demand
sc config netprofm start= demand
sc config NlaSvc start= auto
sc config NetSetupSvc start= demand
sc config nsi start= auto
sc config CscService start= demand
sc config defragsvc start= demand
sc config PNRPsvc start= demand
sc config p2psvc start= demand
sc config p2pimsvc start= demand
sc config pla start= demand
sc config PlugPlay start= demand
sc config PNRPAutoReg start= demand
sc config WPDBusEnum start= demand
sc config Power start= auto
sc config Spooler start= auto
sc config PrintNotify start= demand
sc config wercplsupport start= demand
sc config PcaSvc start= demand
sc config QWAVE start= demand
sc config RasAuto start= demand
sc config RasMan start= demand
sc config SessionEnv start= auto
sc config TermService start= auto
sc config UmRdpService start= demand
sc config RpcSs start= auto
sc config RpcLocator start= demand
sc config RemoteRegistry start= disabled
sc config RetailDemo start= demand
sc config RemoteAccess start= disabled
sc config RpcEptMapper start= auto
sc config seclogon start= demand
sc config SstpSvc start= demand
sc config SamSs start= auto
sc config wscsvc start= delayed-auto
sc config SensorDataService start= demand
sc config SensrSvc start= demand
sc config SensorService start= demand
sc config LanmanServer start= auto
sc config ShellHWDetection start= auto
sc config SCardSvr start= disabled
sc config ScDeviceEnum start= demand
sc config SCPolicySvc start= demand
sc config SNMPTRAP start= demand
sc config sppsvc start= delayed-auto
sc config svsvc start= demand
sc config SSDPSRV start= demand
sc config StateRepository start= demand
sc config WiaRpc start= demand
sc config StorSvc start= demand
sc config SysMain start= auto
sc config SENS start= auto
sc config SystemEventsBroker start= auto
sc config Schedule start= auto
sc config lmhosts start= demand
sc config TapiSrv start= demand
sc config Themes start= auto
sc config tiledatamodelsvc start= auto
sc config TimeBroker start= demand
sc config TabletInputService start= demand
sc config UsoSvc start= demand
sc config upnphost start= demand
sc config UserManager start= auto
sc config ProfSvc start= auto
sc config vds start= demand
sc config VSS start= demand
sc config WalletService start= demand
sc config WebClient start= demand
sc config AudioSrv start= auto
sc config AudioEndpointBuilder start= auto
sc config SDRSVC start= demand
sc config WbioSrvc start= demand
sc config WcsPlugInService start= demand
sc config wcncsvc start= demand
sc config Wcmsvc start= auto
sc config WdNisSvc start= demand
sc config WinDefend start= auto
sc config wudfsvc start= demand
sc config WEPHOSTSVC start= demand
sc config WerSvc start= demand
sc config Wecsvc start= demand
sc config EventLog start= auto
sc config MpsSvc start= auto
sc config FontCache start= auto
sc config StiSvc start= demand
sc config msiserver start= demand
sc config LicenseManager start= demand
sc config Winmgmt start= enabled
sc config WMPNetworkSvc start= demand
sc config icssvc start= demand
sc config TrustedInstaller start= demand
sc config WpnService start= demand
sc config WinRM start= demand
sc config WSearch start= delayed-auto
sc config WSService start= demand
sc config W32Time start= demand
sc config wuauserv start= demand
sc config WinHttpAutoProxySvc start= demand
sc config dot3svc start= demand
sc config Wlansvc start= demand
sc config wmiApSrv start= auto
sc config workfolderssvc start= demand
sc config LanmanWorkstation start= auto
sc config WwanSvc start= demand
sc config XblAuthManager start= demand
sc config XblGameSave start= demand
sc config XboxNetApiSvc start= demand
@echo off
exit


Comments

  • Thanks. Now if you can find the command line that stops Windows 10 from installing Candy Crush Saga for every user that would be great. - chucksteel 8 years ago
    • well a powershell script might do the trick...
      http://www.winbeta.org/news/how-to-remove-candy-crush-saga-from-windows-10 - jamie_kace 8 years ago
      • I have found that running this breaks the start menu for other users on the system and can cause complications with SysPrep. I'm just very frustrated that Microsoft didn't include a way to manage this type of behavior through the unattended install process. - chucksteel 8 years ago
  • you could use the LTBS version of windows which does not include any of those apps. - jgarcia29 7 years ago
    • Very true. Microsoft has not made it super simple to understand all of the options available. As usual. Our new release of Sysprep Creator / Executor can detect the presence of Candy Crush and Twitter and remove them before sysprepping. Kinda cool. Currently in Beta now but should be finished soon. - jamie_kace 7 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ