The full error is as the following:
Unable to start a DCOM Server: Microsoft.Windows.Cortana_18.104.22.16862_neutral_neutral_cw5n1h2txyewy!CortanaUI.AppX8z5q44mt1b9k6x2nkjj0bkr2e1ac0dxy.mca as Unavailable/Unavailable. The error:
Happened while starting this command:
I searched many places but could find any solution which could resolved my issue. I found that I can use the following command to get all packages installed info.
Get-AppxPackage -AllUsers | Format-List -Property PackageFullName,PackageUserInformation
I then noticed that there are some packages are pending for removal. More specifically, I noticed "Microsoft.Windows.Cortana_22.214.171.12462_neutral_neutral_cw5n1h2txyewy" is one of them.
I then use the following command.
Remove-AppxPackage -AllUsers -Package <PackageFullName>
NOTE: -AllUser is the key.
I was able to get pending removal packages all removed, and the best of all, the error was also gone.