Methods
StdRegProv has 20 methods:
Method | Description |
---|---|
CheckAccess | Verifies that the user has the specified access permissions. |
CreateKey | Creates a subkey. |
DeleteKey | Deletes a subkey. |
DeleteValue | Deletes a named value. |
EnumKey | Enumerates subkeys. |
EnumValues | Enumerates the named values of a key. |
GetBinaryValue | Gets the binary data value of a named value. |
GetDWORDValue | Gets the DWORD data value of a named value. |
GetExpandedStringValue | Gets the expanded string data value of a named value. |
GetMultiStringValue | Gets the multiple string data values of a named value. |
GetQWORDValue | Gets the QWORD data values of a named value. |
GetSecurityDescriptor | Gets the security descriptor for a key. |
GetStringValue | Gets the string data value of a named value. |
SetBinaryValue | Sets the binary data value of a named value. |
SetDWORDValue | Sets the DWORD data value of a named value. |
SetExpandedStringValue | Sets the expanded string data value of a named value. |
SetMultiStringValue | Sets the multiple string values of a named value. |
SetQWORDValue | Sets the QWORD data values of a named value. |
SetSecurityDescriptor | Sets the security descriptor for a key. |
SetStringValue | Sets the string value of a named value. |
Learn more about Invoke-CimMethod
and how to invoke commands. Click any of the methods listed above to learn more about their purpose, parameters, and return value.
Properties
StdRegProv returns no properties.
CDXML Definition
You can turn this WMI class and its methods into PowerShell cmdlets by importing below CDXML file (Cmdlet Definition XML) as a module.
Create StdRegProv.cdxml
$folder = "c:\wmi\StdRegProv"
$cdxmlPath = Join-Path -Path $folder -ChildPath "StdRegProv.cdxml"
# create folder if not present:
$exists = Test-Path -Path $folder
if (!$exists) { $null = New-Item -Path $folder -ItemType Directory }
# write file
$content = @'
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is licensed under 'Attribution 4.0 International' license (https://creativecommons.org/licenses/by/4.0/).
You can free of charge use this code in commercial and non-commercial code, and you can freely modify and adjust the code
as long as you give appropriate credit to the original author Dr. Tobias Weltner.
This material was published and is maintained here:
https://powershell.one/wmi/root/cimv2/stdregprov#cdxml-definition
-->
<PowerShellMetadata xmlns="http://schemas.microsoft.com/cmdlets-over-objects/2009/11">
<!--referencing the WMI class this cdxml uses-->
<Class ClassName="Root/CIMv2\StdRegProv" ClassVersion="2.0">
<Version>1.0</Version>
<!--default noun used by Get-cmdlets and when no other noun is specified. By convention, we use the prefix "WMI" and the base name of the WMI class involved. This way, you can easily identify the underlying WMI class.-->
<DefaultNoun>WmiStdRegProv</DefaultNoun>
<!--define the cmdlets that work with class instances.-->
<InstanceCmdlets>
<!--query parameters to select instances. This is typically empty for classes that provide only one instance-->
<GetCmdletParameters />
<!--defining additional cmdlets that modifies instance properties-->
</InstanceCmdlets>
<!--define the cmdlets that work with class instances.-->
<StaticCmdlets>
<!--Test-StdRegProvAccess: invoking method CheckAccess():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Test" Noun="WmiStdRegProvAccess" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="CheckAccess">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'uRequired'-->
<Parameter ParameterName="uRequired">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.uRequired] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.uRequired" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="Required">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of bool in property bGranted-->
<Parameter ParameterName="bGranted">
<Type PSType="bool" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--New-StdRegProvRegistryKey: invoking method CreateKey():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="New" Noun="WmiStdRegProvRegistryKey" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="CreateKey">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Remove-StdRegProvRegistryKey: invoking method DeleteKey():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Remove" Noun="WmiStdRegProvRegistryKey" ConfirmImpact="High" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="DeleteKey">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Remove-StdRegProvRegistryValue: invoking method DeleteValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Remove" Noun="WmiStdRegProvRegistryValue" ConfirmImpact="High" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="DeleteValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Get-StdRegProvChildKey: invoking method EnumKey():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Get" Noun="WmiStdRegProvChildKey" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="EnumKey">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of string in property sNames-->
<Parameter ParameterName="sNames">
<Type PSType="system.string[]" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Get-StdRegProvChildValue: invoking method EnumValues():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Get" Noun="WmiStdRegProvChildValue" ConfirmImpact="High" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="EnumValues">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of string in property sNames-->
<Parameter ParameterName="sNames">
<Type PSType="system.string[]" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Get-StdRegProvBinary: invoking method GetBinaryValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Get" Noun="WmiStdRegProvBinary" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="GetBinaryValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of uint8 in property uValue-->
<Parameter ParameterName="uValue">
<Type PSType="byte[]" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Get-StdRegProvDword: invoking method GetDWORDValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Get" Noun="WmiStdRegProvDword" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="GetDWORDValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of uint32 in property uValue-->
<Parameter ParameterName="uValue">
<Type PSType="system.uint32" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Get-StdRegProvExpandedString: invoking method GetExpandedStringValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Get" Noun="WmiStdRegProvExpandedString" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="GetExpandedStringValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of string in property sValue-->
<Parameter ParameterName="sValue">
<Type PSType="system.string" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Get-StdRegProvMultiString: invoking method GetMultiStringValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Get" Noun="WmiStdRegProvMultiString" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="GetMultiStringValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of string in property sValue-->
<Parameter ParameterName="sValue">
<Type PSType="system.string[]" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Get-StdRegProvQWord: invoking method GetQWORDValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Get" Noun="WmiStdRegProvQWord" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="GetQWORDValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of uint64 in property uValue-->
<Parameter ParameterName="uValue">
<Type PSType="system.uint64" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Get-StdRegProvSecurityDescriptor: invoking method GetSecurityDescriptor():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Get" Noun="WmiStdRegProvSecurityDescriptor" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="GetSecurityDescriptor">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of __SecurityDescriptor in property Descriptor-->
<Parameter ParameterName="Descriptor">
<Type PSType="Microsoft.Management.Infrastructure.CimInstance[]" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Get-StdRegProvString: invoking method GetStringValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Get" Noun="WmiStdRegProvString" ConfirmImpact="Low" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="GetStringValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--Method returns an instance of string in property sValue-->
<Parameter ParameterName="sValue">
<Type PSType="system.string" />
<CmdletOutputMetadata />
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Set-StdRegProvBinary: invoking method SetBinaryValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Set" Noun="WmiStdRegProvBinary" ConfirmImpact="Medium" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="SetBinaryValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'uValue'-->
<Parameter ParameterName="uValue">
<!--the underlying parameter type is uint8 which corresponds to the PowerShell .NET type [byte]-->
<Type PSType="byte" />
<CmdletParameterMetadata Position="3" IsMandatory="false" PSName="Value">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Set-StdRegProvDword: invoking method SetDWORDValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Set" Noun="WmiStdRegProvDword" ConfirmImpact="Medium" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="SetDWORDValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'uValue'-->
<Parameter ParameterName="uValue">
<!--the underlying parameter type is uint8 which corresponds to the PowerShell .NET type [byte]-->
<Type PSType="byte" />
<CmdletParameterMetadata Position="3" IsMandatory="false" PSName="Value">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Set-StdRegProvExpandedString: invoking method SetExpandedStringValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Set" Noun="WmiStdRegProvExpandedString" ConfirmImpact="Medium" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="SetExpandedStringValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValue'-->
<Parameter ParameterName="sValue">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="3" IsMandatory="false" PSName="Value">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Set-StdRegProvMultiString: invoking method SetMultiStringValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Set" Noun="WmiStdRegProvMultiString" ConfirmImpact="Medium" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="SetMultiStringValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValue'-->
<Parameter ParameterName="sValue">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="3" IsMandatory="false" PSName="Value">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Set-StdRegProvQWord: invoking method SetQWORDValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Set" Noun="WmiStdRegProvQWord" ConfirmImpact="Medium" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="SetQWORDValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'uValue'-->
<Parameter ParameterName="uValue">
<!--the underlying parameter type is uint8 which corresponds to the PowerShell .NET type [byte]-->
<Type PSType="byte" />
<CmdletParameterMetadata Position="3" IsMandatory="false" PSName="Value">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Set-StdRegProvSecurityDescriptor: invoking method SetSecurityDescriptor():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Set" Noun="WmiStdRegProvSecurityDescriptor" ConfirmImpact="High" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="SetSecurityDescriptor">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'Descriptor'-->
<Parameter ParameterName="Descriptor">
<!--the underlying parameter type is Win32_SecurityDescriptor which corresponds to the PowerShell .NET type [System.Management.ManagementBaseObject]-->
<Type PSType="System.Management.ManagementBaseObject" />
<CmdletParameterMetadata Position="2" IsMandatory="false">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
<!--Set-StdRegProvString: invoking method SetStringValue():-->
<Cmdlet>
<!--defining the ConfirmImpact which indicates how severe the changes are that this cmdlet performs-->
<CmdletMetadata Verb="Set" Noun="WmiStdRegProvString" ConfirmImpact="Medium" />
<!--defining the WMI instance method used by this cmdlet:-->
<Method MethodName="SetStringValue">
<ReturnValue>
<Type PSType="system.uint32" />
<CmdletOutputMetadata>
<ErrorCode />
</CmdletOutputMetadata>
</ReturnValue>
<!--defining the parameters of this cmdlet:-->
<Parameters>
<!--native parameter name is 'hDefKey'-->
<Parameter ParameterName="hDefKey">
<!--the underlying parameter type is uint32 which really is the enumeration [StdRegProv.hDefKey] that is defined below in the Enums node:-->
<Type PSType="StdRegProv.hDefKey" />
<CmdletParameterMetadata Position="0" IsMandatory="false" PSName="Hive">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sSubKeyName'-->
<Parameter ParameterName="sSubKeyName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="1" IsMandatory="false" PSName="SubKeyName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValueName'-->
<Parameter ParameterName="sValueName">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="2" IsMandatory="false" PSName="ValueName">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
<!--native parameter name is 'sValue'-->
<Parameter ParameterName="sValue">
<!--the underlying parameter type is string which corresponds to the PowerShell .NET type [system.string]-->
<Type PSType="system.string" />
<CmdletParameterMetadata Position="3" IsMandatory="false" PSName="Value">
<ValidateNotNull />
<ValidateNotNullOrEmpty />
</CmdletParameterMetadata>
</Parameter>
</Parameters>
</Method>
</Cmdlet>
</StaticCmdlets>
</Class>
<!--defining enumerations-->
<Enums>
<Enum EnumName="StdRegProv.hDefKey" UnderlyingType="system.uint32">
<Value Name="HKEY_CLASSES_ROOT" Value="2147483648" />
<Value Name="HKEY_CURRENT_USER" Value="2147483649" />
<Value Name="HKEY_LOCAL_MACHINE" Value="2147483650" />
<Value Name="HKEY_USERS" Value="2147483651" />
<Value Name="HKEY_CURRENT_CONFIG" Value="2147483653" />
</Enum>
<Enum EnumName="StdRegProv.uRequired" UnderlyingType="system.uint32">
<Value Name="QUERY_VALUE" Value="1" />
<Value Name="SET_VALUE" Value="2" />
<Value Name="CREATE_SUBKEY" Value="4" />
<Value Name="ENUMERATE_SUBKEYS" Value="8" />
<Value Name="NOTIFY" Value="16" />
<Value Name="CREATE" Value="32" />
<Value Name="DELETE" Value="65536" />
<Value Name="READ_CONTROL" Value="131072" />
<Value Name="WRITE_DAC" Value="262144" />
<Value Name="WRITE_OWNER" Value="524288" />
</Enum>
</Enums>
</PowerShellMetadata>
'@ | Set-Content -LiteralPath $cdxmlPath -Encoding UTF8
# import module
Import-Module -Name $cdxmlPath -Force -Verbose
# list new cmdlets
Get-Command -Module "StdRegProv"
See here for more information on CDXML and CDXML-based PowerShell modules.
Requirements
To use StdRegProv, the following requirements apply:
PowerShell
Get-CimInstance
was introduced with PowerShell Version 3.0, which in turn was introduced on clients with Windows 8 and on servers with Windows Server 2012.
If necessary, update Windows PowerShell to Windows PowerShell 5.1, or install PowerShell 7 side-by-side.
Operating System
StdRegProv was introduced on clients with Windows Vista and on servers with Windows Server 2008.
Namespace
StdRegProv lives in the namespace root/cimv2. This is the default namespace. There is no need to use the -Namespace parameter in Get-CimInstance
.
Implementation
StdRegProv is implemented in Stdprov.dll and defined in RegEvent.mof. Both files are located in the folder C:\Windows\system32\wbem
:
explorer $env:windir\system32\wbem
notepad $env:windir\system32\wbem\RegEvent.mof