Azure directory synchronisation fails with “Invalid namespace”

July 21st, 2015


Azure directory synchronisation fails, and in the Application event log on the system running Azure directory synchronisation, an “Invalid namespace” message is registered.


In the “Directory Integration” section of Azure AD, the “Last sync” date is older than the last scheduled sync time. Additionally, an “Invalid namespace” message is registered in the Application event log on the system running Azure directory synchronisation software and the “Synchronization Service Manager” software (miisclient.exe) shows that the tasks are no longer running as per the history.


This is caused by the de-registration of the “MicrosoftIdentityIntegrationServer” WMI namespace.


Re-register the WMI namespace by locating the mmswmi.mof file and executing the following command: -

mofcomp mmswmi.mof

How to quickly delete a folder when Windows says the path is too long

August 3rd, 2014

If you’ve ever had a folder that won’t delete because Windows says “the path is too long”, you’ve probably felt the frustration of trying many different methods in vain.

Luckily, if you’re running a modern version of Windows (which everyone should be), you’ll have robocopy, which can help you out in this case.

To delete that pesky folder, follow these steps: -

  • Create a new blank folder called whatever you like (for example, “DeleteMe”)
  • Open up a command prompt (depending on the folder you’re trying to delete, you may need to run as an administrator)
  • Run robocopy using the example below, assuming that the folder you are trying to delete is called “C:\PeskyFolder” and the blank folder you created is called “C:\DeleteMe”

robocopy “C:\DeleteMe” “C:\PeskyFolder” /e /mir

The above command will “copy” everything out of “C:\DeleteMe” and “paste” it into “C:\PeskyFolder” overwriting any existing contents… Which in this case, deletes the entire contents of the folder.

When it’s done, simply delete the folder itself.

OneDrive/SkyDrive not syncing

July 19th, 2014

I had a recent issue where Microsoft’s OneDrive (formerly SkyDrive) was not syncing changes to their cloud. I noticed there was no Windows service that I could restart, so I just tried a PC restart to see what would happen.

In the system tray, hovering over the OneDrive icon shows that “OneDrive is starting…”, but never moved on from that state (still hours later). A manual sync didn’t seem to work, neither did cancelling and retrying the sync.

Here is the solution that worked for me to kick OneDrive into gear: -

  • As an Administrator, open a command prompt (Win + R, type cmd, and press CTRL + SHIFT + enter)
  • Run “skydrive /shutdown” (notice that internally the executable is still called “skydrive.exe”)
  • Notice that the system tray icon disappears (you may need to hover over it for it to disappear)
  • Run “skydrive”

The system tray icon should re-appear and this time when hovering over it, it should tell you its sync progress