TechShizz | All posts tagged 'Operating Systems'

Features on Demand

Get list of Windows Features/Roles

 

get-windowsfeature

======================================

To uninstall a single feature/role

 

Uninstall-WindowsFeature DHCP -remove

======================================

To uninstall all Features/Roles not installed


Get-WindowsFeature | Where-Object -FilterScript { $_.Installed -Eq $False } | Uninstall-WindowsFeature -Remove

======================================

To install a removed feature

Insert the iso or CD, and this will be used as the source for the binaries.

 

Install-WindowsFeature DHCP -source D:\sources\sxs

Install-WindowsFeature DHCP -source WIM:D:\sources\install.wim:1


 

REMEMBER to select the correct Index for the WIM file. Must be same Index as the current OS.


 

Sample Hosts File

# The localhost entry should be in every HOSTS file and is used

# to point back to yourself.

127.0.0.1        localhost

# My test server for the website

192.168.1.2        test.bleepingcomputer.com

#Blocking known malicious sites
127.0.0.1  admin.abcsearch.com
127.0.0.1  www3.abcsearch.com #[Browseraid]
127.0.0.1  www.abcsearch.com #[Restricted Zone site]

Windows Update Fix

If windows update fails to install try this:
Step by step instructions to get the issue fixed.

 

a) Press Windows key + X and select Command Prompt (Admin).

  

b) On the open Command Prompt window copy and paste the commands (all at once)

 

net stop wuauserv

 

net stop cryptSvc

 

net stop bits

 

net stop msiserver

 

ren C:\Windows\SoftwareDistribution SoftwareDistribution.old

 

ren C:\Windows\System32\catroot2 catroot2.old

 

net start wuauserv

 

net start cryptSvc

 

net start bits

 

net start msiserver

 

c) Wait for the process to complete.

 

d) Close the Command Prompt.

 

 

Now, try to install Windows Updates again and check if it helps.

 

=======================================================

 

I was getting this error too, but solved removing a value from registry:

  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability
    • ThresholdOptedIn

How is my registry now (downloading updates):