Wednesday, 11 September 2019

Azure File Sync - Cloud Tiering but drives full

Azure File Sync is a really useful technology especially if you have file servers with lots of files which are not used very often.  With cloud tiering enabled you can reduce drives with terabytes of data down to gigabytes. 

But there is one thing to watch out for if you have hundreds of thousands or millions of files.

If you have for example half a million files and find that a 30GB drive is filling up even though you have cloud tiering enabled at say 80% then you've run into the same issue that I did. 

I spent weeks working with Microsoft to try and figure out why it looked like cloud tiering wasn't working. I could see all the files were offline with APLO attributes but still the disks were full.  I'd picked this server up from someone else and hadn't noticed how the disks had been configured. 

They'd been formatted with 64k allocation unit size.  This meant with half a million files they were using over 30GB of space.  Reformatted to 4k block size and now my disks are less than 20% full.

Thursday, 20 June 2019

Start menu and Appx broken on Windows Server 2016 (with Citrix installed)

I'd been trying to fix an issue with some servers where 

  • the Start Menu wouldn't work
  • unable to right-click any icons on the taskbar (to runas administrator etc)
  • any metro style app fails to load
  • ms-settings: doesn't work
I'd tried all the usual fixes, sfc /scannow, dism checks and restores.  Finally I identified that its an issue caused by Citrix XenApp 7.15.2000 ( 

Get-appxpackage returns nothing.  Trying to repair appx packages using powershell and add-appxpackages was failing with error 0x80070002 

Contacted Citrix they said I'd need to contact Microsoft to fix. Helpful!

Finally found the issue, which was a combination of suggestions I'd found elsewhere but here's my solution

You need a server where it works to export the registry keys. Obviously suggest that this is the same version of Windows.

  • Export the registry HKLM\Software\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore from a good machine
  • On the server which has the issue take ownership of the same key, and give your user full permissions.
  • Import the registry file you exported from the other server.
  • Then in Powershell running as admin:
    • ((Get-ChildItem "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\InboxApplications") | Get-ItemProperty).Path | Add-AppxPackage -Register -DisableDevelopmentMode 
  • Set ownership on the key back to SYSTEM
Providing there are no errors your start menu should return to normal.

Hopefully this helps someone else who has spent many hours trying to fix the same issue.