get-windowsfeature : The given key was not present in the dictionary
When you run the get-windowsfeature cmdlet in PowerShell on Windows Server 2012 you may see the following error
get-windowsfeature : The given key was not present in the dictionary.
At line:1 char:1
+ get-windowsfeature
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-WindowsFeature], KeyNotFoundException
+ FullyQualifiedErrorId : System.Collections.Generic.KeyNotFoundException,Microsoft.Windows.ServerManager.Commands
.GetWindowsFeatureCommand
This seems to occur if there is a problem in the following registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager\ServicingStorage\ServerComponentCache
As this is just a cache registry key you can try renaming the key to ServerComponentCache.old and then re-running the PowerShell command or refreshing the view in server manager.
This recreates the key and rebuilds the server feature information.
get-windowsfeature : The given key was not present in the dictionary.
At line:1 char:1
+ get-windowsfeature
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-WindowsFeature], KeyNotFoundException
+ FullyQualifiedErrorId : System.Collections.Generic.KeyNotFoundException,Microsoft.Windows.ServerManager.Commands
.GetWindowsFeatureCommand
This seems to occur if there is a problem in the following registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager\ServicingStorage\ServerComponentCache
As this is just a cache registry key you can try renaming the key to ServerComponentCache.old and then re-running the PowerShell command or refreshing the view in server manager.
This recreates the key and rebuilds the server feature information.
- While you're here -
Why not check out our Windows Server Documentation and Audit Tool?
Why not check out our Windows Server Documentation and Audit Tool?
Thank you very much. I tried this and it fixed my issue. Amazing!
ReplyDeleteHappy to help!
DeleteSame here, thanks man!
ReplyDeleteThank you very much man!!.This solved my issue
ReplyDeleteThank you solved my issue
ReplyDeleteNo problems :) glad it helped
DeleteAce - this is going in my personal list of useful tips that REALLY fix issues..
ReplyDeleteThank you. I don't think I would ever have found this particular one.
ReplyDeleteNo problems, feel free to check out our network documentation tool :)
Deletehttps://www.centrel-solutions.com/xiaconfiguration/network-documentation-tool.aspx?referrer=dblogad
Thanks, worked.
ReplyDeleteIt works! Brilliant, thank you.
ReplyDeleteIt helped me as well, thank you!
ReplyDeleteThanks a lot,
ReplyDeleteSuch a simple fix to repair a big mess. Thanks for the post. It worked.
ReplyDeleteThank you very much! You made my day!!!!
ReplyDeleteYou're helping people 5 years later! Worked perfectly. Thanks David!
ReplyDeleteThis helped me today. Thank you! :-)
ReplyDeleteWorked for me as well. Thanks!
ReplyDelete-Server 2016 STD
Error received (prior to reg fix):
****************************************************************
get-windowsfeature : The given key was not present in the dictionary.
At line:1 char:1
+ get-windowsfeature
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-WindowsFeature], KeyNotFoundException
+ FullyQualifiedErrorId : System.Collections.Generic.KeyNotFoundException,Microsoft.Windows.ServerManager.Commands
.GetWindowsFeatureCommand
****************************************************************
Don't know if this was the same for everyone else or not but I had to make sure I exited out of Regedit before it would rebuild the key. So if, after you rename the key, it still doesn't work. Make sure that you've exited out of Regedit then try again
ReplyDeleteHI
ReplyDeleteI resolved the issue with help of this post. Thank you
Thnks a lot...:)
ReplyDeleteThis allowed mt to continue working in a normal manner
ReplyDeleteWork! Thanks
ReplyDeleteThanks! Works!
ReplyDeleteW2016
Worked for me on Server 2019. Thank you for this!
ReplyDelete