How to delete Windows 10 bloatware so you can run sysprep

When you run sysprep under Windows 10 (Windows 8/8.1) you receive an error message saying that Sysprep was not able to validate your Windows installation.  Review the log file at %Windir%/System32\Sysprep\Panther\setupact.log for details. When you look at the log file, the message tells you that you can not run the sysprep because there is an application that was installed for a user, but was not provisioned for all users. The application name varies. This error occurs because the Windows 10 installs a lot of bloatwares that you must uninstall before you can run the sysprep.

The following scripts will help you uninstall the programs from your image, so you can run the sysprep.

First you can run the following script to see what provisioned apps are running.

Get-AppXProvisionedPackage -Online | Select PackageName

Use this command to remove the provisioned package.

Remove-AppXProvisionedPackage -Online | Select PackageName

Or use this command to remove all of them all at once.

Get-AppXProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online

You may also have to run the following command to uninstall more packages.

Get-AppxPackage | Select Name, PackageFullName

You can then use the following command to remove the packages.

Get-AppxPackage PackageFullName | Remove-AppxPackage (You can use wildcards such as * for full name)

Use the following command to uninstall packages all at once.

Get-AppxPackage -allusers PackageFullName | Remove-AppxPackage (Removes allusers program)

Get-AppxPackage -user username PackageFullName | Remove-AppxPackage (Removes particular users program)

Get-AppxPackage | Remove-AppxPackage  (Removes all packages)
Advertisements

Setting up Key Management Server (KMS) on Windows Server 2008

KMS activates computers on a local network, eliminating the need for individual computers to connect to Microsoft. To do this, KMS uses a client–server topology. KMS client computers can locate KMS host computers by using Domain Name System (DNS) or a static configuration. KMS clients contact the KMS host by using remote procedure call (RPC). KMS can be hosted on computers that are running the Windows Vista, Windows 7, Windows Server 2003, Windows Server 2008, or Windows Server 2008 R2 operating systems.

  1. Go to the volume licensing center and grab a copy of the KMS key for your server OS
    1. Navigate to https://www.microsoft.com/Licensing/servicecenter/home.aspx
    2. Login
    3. Select Downloads and Keys
      Volume Licensing Service Center - Downloads and Keys
    4. Select Windows Server
      Volume Licensing Service Center - Windows Server
    5. Finder your server version and click Key
      Volume Licensing Service Center - Windows Server - Key
    6. Copy the KMS type key
  2. Login to the server you want to setup as the KMS server.
  3. Open up a command prompt as an administrator.
  4. Ensure you are in the system32 folder of Windows
    1. cd c:\Windows\System32
      windows - System 32
  5. Execute the following command to setup your license key
    1. cscript slmgr.vbs /ipk WINDOWS-KMS-LICENSE-KEY-HERE
      cscript slmgr ipk
  6. Execute the following command to activate the host
    1. cscript slmgr.vbs /ato
      Activating Windows
  7. Execute the following command to verify the host has the Key Management Service enabled
    1. cscript slmgr.vbs /dlv
      cscript slmgr dlv
  8. Next, we need to open the firewall for the server to accept activation requests
    1. Open up Windows Firewall with Advanced Security
      Windows 8 - Windows Firewall with Advanced Security
    2. Right click on Inbound Rules and select New Rule…
      Windows Firewall with Advanced Security - New Rule
    3. Select Port and click Next >
      New Inboud Rule Wizard - Port
    4. Check TCP, check Specific Local Ports and enter port 1688, click Next >
      New Inboud Rule Wizard - Specific local ports
    5. Check Allow the connection and click Next >
      New Inboud Rule Wizard - Allow the connection
    6. Check Domain and click Next >
      New Inboud Rule Wizard - Domain
    7. Enter a name for the rule and click Finish
      New Inboud Rule Wizard - Rule Name

Congrats!  Your KMS server should now be ready to accept activation requests!

Force sync a single outlook folder when using cached mode

To correct folder synchronization in Outlook 2013 and 2010, simply right-click the folder, select properties. On the General tab of properties, click “Clear Offline Items”, click OK, click OK, then Shift-F9 to force synchronization on the folder. To confirm go into the properties of the folder, select the Synchronization tab verify the Server folder matches the Offline folder.

In Place Upgrade Of Windows Server 2008 R2 Standard To Enterprise Or Datacenter Edition

If you need to upgrade a server running Windows Server 2008 R2 Standard to either the Enterprise, or Datacenter editions, it’s possible to do so online, without re-installing Windows.

Open an elevated command prompt and type DISM /Online /Get-CurrentEdition.  This will return the current Windows version.

Type DISM /Online /Get-TargetEditions to list the Windows editions to which this server can be upgraded.

If you type DISM /Online /Set-Edition:ServerDataCenter you’ll get the message in the screenshot below.  This is because even if you’re using a KMS server for internal activation, you have to provide a product key.  Fortunately, Microsoft have a page that lists the KMS client setup keys http://technet.microsoft.com/en-us/library/ff793421.aspx.  On this page you can find keys for Windows Server 2008 R2 Enterprise and Datacenter.

Typing DISM /Online /Set-Edition:ServerDataCenter /ProductKey:xxxxxx will upgrade the operating system.  All that’s required to complete the upgrade is a reboot.

Microsoft Outlook 2013 hangs at “Loading Profile…” after Office Update

Now here’s an interesting conundrum.  A recent update to Microsoft Office 2013 that’s being pushed out automatically to clients results in some of them being unable to open Outlook 2013.  Instead of running normally, the program will hang at the “Loading Profile” stage of launch, as though the profile is corrupt (if you haven’t already checked this, it could actually be the case instead of course).  A workaround is to open Outlook using the well-known /safe command line switch; but this is merely a workaround (which in turn disables all add-ons), not a permanent solution.

For a much more reasonable resolution, try this instead:

  1. Run regedit (Start > Run > type regedit and press ENTER)
    1. On Windows 8, Win + R; type regedit and press ENTER
  2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common
  3. Right-click, select New > Key and name it Graphics
  4. Select the Graphics key you just created, right-click in the right panel and chooseNew > DWORD (32-bit) Value and name it DisableHardwareAcceleration.
  5. Double-click the new value and assign it a value of 1.
  6. Close regedit and try opening Outlook again.

This should fix the problem.  I first stumbled upon the solution when I realized that opening my TeamViewer Remote Support program while Outlook was loading kicked it into launching, which suggested either a network- or graphics-related cause (as TV affects both of those when launching).  The original solution listed here came from the Microsoft Office 2013 Issues Blog, though the symptoms listed are different from these.

Hope this helps! 🙂

How to enable auto login for Windows 7

Problem

After a workstation is added to an Active Directory domain you are unable to set the computer to automatically logon using the control userpasswords2 (User Accounts) tool.

When you open the tool you find the ‘Users must enter a user name and password to use this computer’ option is missing.

MSWindows7-AutoLogonDomain

Solution

NOTE: Passwords for domain accounts typically expire and are changed regularly. If the password for the domain account changes you will need to update the settings in the registry.

You will need to configure the automatic logon through the registry editor.

  1. Open the registry editor (regedit)
  2. Navigiate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  3. Open the ‘AutoAdminLogon’ key and change it’s value to “1”
  4. MSWindows7-AutoLogonDomain2
  5. Open the ‘DefaultDomainName’ key and set the value to your domain name (or the computers name if using a local account)
  6. Open the ‘DefaultUserName’ key and set the value to the user name for the auto logon
  7. Create a new STRING (REG_SZ) value called ‘DefaultPassword’ and set the value to the user account password.

NOTE:

If you’re unsure what the ‘DefaultDomainName’ field needs, you can open the command prompt (Windows + R, enter cmd and hit enter) and enter

echo %userdomain%

If you’re unsure what the ‘DefaultUserName’ field needs, you can open the command prompt (Windows + R, enter cmd and hit enter) and enter

echo %username%

The output (in this case “DEV” needs to be the same as the ‘DefaultDomainName’ value as indicated in the picture below).

MSWindows7-AutoLogonDomain3

Error: word couldn’t start last time. safe mode could help you troubleshoot the problem

When you start any MS Office 2013 software, you receive a message telling you that you need to start in safe mode. “Word couldn’t start last time. safe mode could help you troubleshoot the problem”.

Disable hardware acceleration (This fixed MY problem!)

1. Run regedit (Win + R ; “regedit“)
2. Browse to HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common
3. Create a New Key and name it “Graphics
4. Select Graphics, right-click on the right panel and create a New DWORD (32-bit) Value and name it DisableHardwareAcceleration.
5. Enter Value data as 1
Try to run Excel normally now.