Provider is not capable of the attempted operation

A question on the ( forum described a situation where the user was trying to use Set-WmiInstance to set a property on a particular WMI class instance.

The attempt failed and the message “Provider is not capable of the attempted operation” was part of the reported exception.

This message very often indicates that you are trying to write to a readonly property – which was the case here.  The class was Win32_SystemEnclosure and the property was SMBIOSAssetTag.

If you use get-member

Get-WmiObject -Class Win32_SystemEnclosure | Get-Member

and look at the SMBIOSAssetTag property you’ll see this

SMBIOSAssetTag            Property      string SMBIOSAssetTag {get;set;}

BUT that’s not right because if you look at the documentation at

you’ll see this:

Data type: string

Access type: Read-only

Asset tag number of the system enclosure.

Get-Member doesn’t report correctly on whether a WMI class’ property is readonly.  The best way to find out is to use Get-CimClass

£> $class = Get-CimClass Win32_SystemEnclosure
£> $class.CimClassProperties[‘SMBIOSAssetTag’]

Name               : SMBIOSAssetTag
Value              :
CimType            : String
Flags              : Property, ReadOnly, NullValue
Qualifiers         : {MappingStrings, read}
ReferenceClassName :

And you can see in the flags that the property is ReadOnly.

Get-CimClass should be your starting point when investigating WMI classes.

This entry was posted in CIM, PowerShell and WMI, PowerShell V3, PowerShell v4. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s