I am trying remove the StoragePool using the remove-StoragePool PowerShell command but getting the error - The storage pool could not complete the operation because its health or operational status does not permit it.
So, I try to set it to read-write using set-StoragePool command but getting the following - Access denied. I am running the PowerShell as the local administrator.
Please see the below output.
PS C:\> get-storagepool
FriendlyName OperationalStatus
HealthStatus IsPrimordial
IsReadOnly
------------ -----------------
------------ ------------
----------
Pool1PRDSQL3 Read-only
Unknown False
True
PS C:\> remove-storagepool -FriendlyName Pool1PRDSQL3
remove-storagepool : The storage pool could not complete the operation because its health or operational status does not permit it.
At line:1 char:1
+ remove-storagepool -FriendlyName Pool1PRDSQL3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (StorageWMI:ROOT/Microsoft/...SFT_StoragePool) [Remove-StoragePool], CimException
+ FullyQualifiedErrorId : StorageWMI 48006,Remove-StoragePool
PS C:\> get-storagepool "Pool1PRDSQL3" | Set-StoragePool -IsReadOnly $false
Set-StoragePool : Access denied
At line:1 char:34
+ get-storagepool "Pool1PRDSQL3" | Set-StoragePool -IsReadOnly $false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (StorageWMI:ROOT/Microsoft/..._StorageCmdlets) [Set-StoragePool], CimException
+ FullyQualifiedErrorId : StorageWMI 40001,Set-StoragePool