Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix Storage Module Cmdlet when they can't run on Powershell Windows 10

Tags:

powershell

Any one know How to fix Storage Module Cmdlets when then can't run on powershell over Windows 10 ?

I have try all Cmdlets like get-disk , get-volume but all gives the following massage

PS C:\Users\administrator.HUPCHONGFURNITU\Documents> get-volume

get-volume : Invalid property + CategoryInfo : MetadataError: (MSFT_Volume:ROOT/Microsoft/...age/MSFT_Volume) [Get-Volume], CimException + FullyQualifiedErrorId : HRESULT 0x80041031,Get-Volume

PS C:\Users\administrator.HUPCHONGFURNITU\Documents> Get-Disk

Get-Disk : Invalid property + CategoryInfo : MetadataError: (MSFT_Disk:ROOT/Microsoft/Windows/Storage/MSFT_Disk) [Get-Disk], CimException + FullyQualifiedErrorId : HRESULT 0x80041031,Get-Disk

like image 238
wee cheng yong Avatar asked Dec 10 '25 11:12

wee cheng yong


1 Answers

I found that if VSS and/or SMPHost services are disabled, the MSFT_Volume namespace will not be rebuilt during a WMI repair.
During the repair that JPBlank suggested, also do these commands before you clear the WBEM repository:

sc config vss start= demand

sc config smphost start= demand

sc stop SMPHost

sc stop vss

This will set them both to demand start and make sure they are not running before you clear the repository

I wrote a twitter thread on this as well: https://twitter.com/YarnoSG/status/1646171772952117248

like image 115
Steven Yarnot Avatar answered Dec 13 '25 01:12

Steven Yarnot