Search The Web

Tuesday, April 8, 2014

Use Powershell to Uninstall or Install Windows Roles and Features

Use Powershell to Uninstall or Install Windows Roles and Features 

You can use Powershell or uninstall or install Windows Roles and Features instead of using the GUI. This is especially useful in two scenarios : Server Core installations and also for scripting (new server installs, remote installs etc).
Firstly, you will need to identify the name of the Windows Feature that you wish to add / remove. Open an Administrative powershell prompt and type:  get-windowsfeature
Get-Windowsfeature
Get-Windowsfeature
Once you have identified the roles and feature that you wish to remove (in this case we are going to remove the gui shell) tye the command uninstall-windowsfeature If you want to force a reboot at the end of the process then use the -reboot switch.
Uninstall-windowsfeature
Uninstall-windowsfeature
If you wanted to re install this feature, or install any other feature then again open an administrative powershell prompt and type install-windowsfeature
Install-WindowsFeature
Install-WindowsFeature
Again, if you wanted to force the reboot (especially useful when scripting this then add the -reboot switch.







How To Fix Windows Update Error 80070005.

How To Fix Windows Update Error 80070005.


Windows Update Error 80070005 is usually caused by something going awry in your user permissions to the point where Windows Updates cannot install as it no longer has permissions. The fastest way I am aware of to get around Windows Update Error 80070005 is as follows:
  1. Log off the current user and log in with the administrator Account
  2. attempt to install updates from Microsoft updates ( or local WSUS server if applicable)
  3. after updates have been re installed reboot the computer and log in as the original user.
  4. The user should now be able to install updates
I'm not sure why this works, but it does! I would hazzard a guess that logging in as local admin allows the computer account to reset the ACL permissions that it needs.
The other things to check in troubleshooting Windows Update Error 80070005 are:
  1. Make sure that the firewall is not blocking windows updates. to verify this disable your firewall and try
  2. is the user profile generally corrupt? if so try and old out the profile (details on how to do so here: http://dizzyit.com/2011/10/29/how-do-i-old-out-a-windows-7-user-profile/)
  3. run the windows update repair tool and see if this fixes your issue (details here: http://dizzyit.com/2013/06/07/fix-windows-update-issues/)
This article can also be found on our sister site DizzyIT .com at : http://dizzyit.com/2014/04/07/fix-windows-update-error-80070005/