Windows Update Stuck Pending


I’m not sure if these operations would cause any other problems (and if it safe to do so.), but at least I can install features now. And these are what I’ve done.

It’s important to backup before doing these.

Basically, I’m cleaning CBS update pending records.

  1. Open regedit, find HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component
    Based Servicing
    . You will see PackagesPending, right click it, open Permission. Click on Advanced, change owner to Administrator (or any other users you are using). Close Advanced Window. Give that user Full
     in Permission Window. And delete PackagesPending.
  2. Repeat 1. to Reboot
  3. Open X:\Windows\WinSxS in explorer, you will see pending.xml. In its Properties, repeat 1. And delete pending.xml.
  4. Reboot and everything looks well now.

And, don’t forget backup registry and files you deleted.


Office365: setting maximum mail transport limits (email+attachments)…


Office365: setting maximum mail transport limits (email+attachments)…


** NOTE ** The parameters -“InternalDsnMaxMessageAttachSize” and “ExternalDsnMaxMessageAttachSize” are no longer recognized by the Azure PS add-on module; even though the parameters are visible upon viewing a “Get-TransportConfig”. Apparently Microsoft has now set all attach sizes to/from Office365 mailboxes (somehow I doubt this) to 25MB. The article supplied by MS on this is:
** END NOTE **

Hopefully this helps someone else out there; the amount of PowerShell commands and cmdlets can be quite overwhelming, and knowing what add-on you need for PowerShell to manage your Office365 installations can be a big time waster.

Here are my notes.

Steps (11 total)


What version of PS do you have?

Windows 7 comes with PowerShell v2 as part of the package, and Win8 comes with v3. If you’re using Vista or XP you’ll have to update to at least v2; but that’s outside of this post.


Install Microsoft Online Services Sign-On Assistant for IT Pros:


Install Windows Azure AD Module (may be unnecessary for this procedure, but will be necessary for others – I install it by default)


Reboot after install.

Yeah, you know where that is – the power switch. Or the Start menu/shutdown/reboot. If you’re feeling plucky, Win+R “shutdown /r” – of course there will be some scripting people commenting later on other ways too 🙂


Start PowerShell

Start PowerShell as admin (you will notice a new program group-Windows Azure Active Directory with a PowerShell shortcut; it’s safe to start this or the main PowerShell program for our purpose).


The COMMANDS – feel Powerful yet?

Once in PS, and **having your admin credentials for your Office365 subscription**, enter the following commands;

$LiveCred = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $LiveCred -Authentication Basic –AllowRedirection

Import-PSSession $Session


Let’s see what our values are here…



Explanation to Get-TransportConfig

‘ Now – pay special note to the output from this last command, “Get-TransportConfig” – look for the lines “InternalDsnMaxMessageAttachSize” and “ExternalDsnMaxMessageAttachSize”. This is your current max for outbound and inbound emails. Most likely it’s at 10MB, and not what you want.


Set the new maxmessagesize…

Set-TransportConfig -InternalDsnMaxMessageAttachSize (nn)MB

‘ Change the (nn) to a number – in meagabytes – that you want for your maximum. Might be 20, 40, etc… supposedly the global max is 25.

‘ example:

Set-TransportConfig -InternalDsnMaxMessageAttachSize 20MB


Set the external maxmessagesize…

Set-TransportConfig -ExternalDsnMaxMessageAttachSize (nn)MB

‘ Again, see above note on what to replace (nn) with…
‘ Example:

Set-TransportConfig -ExternalDsnMaxMessageAttachSize 20MB

‘ This will set the max incoming message size (individually) to 20MB – as I understand it.


Now check your settings and kick back…


‘ Now check your config the “*maxmessageattachsize” variables- you should see your new max sizes replaced with what you programmed.


‘ Good luck!

SCCM 2012 – How to deploy a msu update package


Today I had to deploy a Microsoft hotfix that would fix an issue we were experiencing.  The hotfix was a msu file and although I had deployed many msu’s in the past, I realised that I hadn’t blogged the process.  So here we are!

To deploy the msu I will be using the wusa.exe (Windows update standalone installer) that is built into most versions of Windows operating systems.  You can find out more about wusa here:

The first thing I did was download the hotfix and store the resulting .msu file on my SCCM server where I normally keep all of my application source files.

Next up, I chose to create a new Application:

  1. Select to ‘Manually specify the application information’
    1 - Manually specify app info
  2. Complete the ‘General Information’ screen to your tastes…
    2 - General Info
  3. I chose to leave the ‘Application Catalog’ screen at the defaults as I will not be making this available to the catalog; rather it will be a required device deployment.
    3 - App Catalog
  4. Click the ‘Add’ button so that we can add a new deployment type.
    4 - Deployment Type - Add
  5. Select ‘Script Installer’ and to ‘Manually specifiy the deployment type information’
    5 - Script Installer
  6. For the General Information screen, complete any fields with the appropriate information.  I chose to add ‘x64’ in the name as I downloaded the x64 msu so this deployment type will be for x64 computers only.  Later, you could add a x86 deployment type if you needed to.
    6 - General Info
  7. Browse to where you have stored your msu file and then add the following for the:
    Installation Program:

    wusa.exe "nameOfTheMsu.msu" /quiet /norestart

    Uninstall Program:

    wusa.exe /uninstall "nameOfTheMsu.msu" /quiet /norestart

    * Note that I chose to suppress reboots.
    * Note that the screenshot below will look slightly different to yours as you go through the new application wizard as I made a typo in my original screenshot and fixed it after the application was complete – this gives you a slightly different view but essentially it’s the same.

  8. Click the ‘Add Clause’ button
    8 - Add Clause
  9. This is where we will add our detection rule.  In this instance, I looked at the KB article from Microsoft for this particular msu and it showed me the name of the file that would be changed along with the new version number of the changed file.  You will find this information on most hotfix KB’s:
    9 - Detection Rule - Finding out version numbers
  10. Here’s the current version on one of our affected computers…as you can see, the version number is older than the one listed in the hotfix (Step 9 above):
    10 - Current Location and version
  11. Now we know what to look for, the detection rule is easy.  Here’s what my resulting rule looked like which is based on the Microsoft KB:
    11 - Detection Rule
  12. Click next!
    12 - Detection Method Complete
  13. Change the user experience to ‘Install for system’ and ‘Whether or not a user is logged on’ (As I will be making this a required device deployment.)
    13 - User Experience
  14. Click the Add button for our system requirement
    14 - Add Requirements
  15. I simply chose all Windows 7 x64 computers as that is what this particular msu applies to:
    15 - Create Req
  16. The completed requirement:
    16 - Completed req
  17. I did not have any dependencies to add so I clicked next.
    17 - Dependencies
  18. Take a look at the Summary screen:
    18 - Deployment Summary
  19. We have success!
    19 - Deployment Type Success
  20. At this point, we could add a secondary deployment type if we were going to deploy the x86 version of this MSU by clicking the add button.  I am not so I clicked next.
    20 - Next
  21. Another Summary:
    21 - Summary
  22. And we’re done.
    22 - Completion

All that’s left is to upload this to your distribution point and deploy it to your computer collection.

That’s it!

SQL Server 2008, can’t save changes to tables

SQL Server 2008, can’t save changes to tables

When you design a table in a database and then try to make a change to a table structure that requires the table to be recreated, the management tools will not allow you to save the changes.
You will get an error stating, “You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table be re-created.”

What a pesky problem.  It prevents you from making progress when you making database changes. It’s a good thing you can turn it off.
This is caused when you make one of the following changes:

  • You change the Allow Nulls setting for a column.
  • You reorder columns in the table.
  • You change the column data type.
  • You add a new column.

Here’s how you fix it.
In Management Studio, go to Tools –> Options –> Designers –> Tables and Designers and uncheck the Prevent Saving Changes that require table re-creation option.

Now Management studio will work like expected.


Microsoft recommends you don’t turn this option off and that you use T-SQL to make changes to your tables.
Turning off this option will conflict if you have Change Tracking feature turned on.  If you turn off this option and make a change to table with change tracking on all the tracking changes  for that table will also be deleted.
To check if you have change tracking turned on, right click on your table and go to properties, look for the option Change Tracking.


Here is the kb article from microsoft:


Internet Explorer Install Failing Even Though Prerequisites Are Installed

Check the IE11_main.log file in C:\Windows. Find which prerequisites the installer is not seeing. Will usually be a time out issue with the WMI Query. Can possibly see one or both of the following errors:

Setup exit code: 0x00009C47 (40007) – Required updates failed to download.

WMI query for Hotfixes timed out. Query string: ‘Select HotFixID from Win32_QuickFixEngineering WHERE HotFixID=”KB2729094″‘  Error: 0x00040004 (262148).


  1. Open a powershell window for each prerequisite
  2. Run the following loop command changing the KB number for each prerequisite
    1. While($true){
      Get-WmiObject -Query ‘Select HotFixID from Win32_QuickFixEngineering WHERE HotFixID=”KB2729094″‘}