PSRegistry.dll-Help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Add-RegKeyProperty</command:name> <command:verb>Add</command:verb> <command:noun>RegKeyProperty</command:noun> <maml:description> <maml:para>Creates or updates registry key properties.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Add-RegKeyProperty is used to add new registry properties to registry keys. If a key already has a property with the specified name it will be overwritten.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Add-RegKeyProperty</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Key</maml:name> <maml:Description> <maml:para>The registry keys where the properties should be added. This can either be a string with the registry key path or it can be a Registry key object returned by Get-RegKey.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryKey[]</command:parameterValue> <dev:type> <maml:name>RegistryKey[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Name</maml:name> <maml:Description> <maml:para>The name of of the properties to add.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>Value</maml:name> <maml:Description> <maml:para>The value to add.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>ValueKind</maml:name> <maml:Description> <maml:para>The registry type (String, Dword, etc.) of the value that will be added. By default it is set to Unknown where the cmdlet will find an appropriate type.</maml:para> <maml:para>String and ExpandStrings are handled like this: Null = Empty string Everything else = The result from the ToString method.</maml:para> <maml:para>Binary: Null = Empty byte array String = The unicode representation of the string is converted to bytes. Generic array = Each element is cast to int and then to byte. Int = The int is cast to a byte and saved in a byte array.</maml:para> <maml:para>Dword or Qword: Null = 0</maml:para> <maml:para>MultiString: Null = Empty string array. Generic array = The ToString method is run on every element. Everything else except string arrays = The ToString method is run on the object and put into a single element string array.</maml:para> <maml:para>Unknown or None: Null = Empty String Generic array where first element is an interger = Binary. (Every element is cast to int, then byte). Generic array where first value is a string = MultiString value. (ToString is run on each element).</maml:para> <maml:para>Every other scenario is handled automatically by the underlying SetValue (https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.registrykey.setvalue)method.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">Unknown</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">String</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">ExpandString</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Binary</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">DWord</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">MultiString</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">QWord</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">None</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryValueKind</command:parameterValue> <dev:type> <maml:name>RegistryValueKind</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Unknown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="DontCloseKey, NoDispose"> <maml:name>DontDisposeKey</maml:name> <maml:Description> <maml:para>Specifies that the registrykey should not be disposed after the properties have been added. This is useful when you need to do multiple operations on a registry key and plan on manually disposing it when done.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Add-RegKeyProperty</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Key</maml:name> <maml:Description> <maml:para>The registry keys where the properties should be added. This can either be a string with the registry key path or it can be a Registry key object returned by Get-RegKey.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryKey[]</command:parameterValue> <dev:type> <maml:name>RegistryKey[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Property</maml:name> <maml:Description> <maml:para>The properties to add. This can either be a hashtable with the property names and values, or a [PSRegistry.RegistryProperty] object.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryProperty[]</command:parameterValue> <dev:type> <maml:name>RegistryProperty[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="DontCloseKey, NoDispose"> <maml:name>DontDisposeKey</maml:name> <maml:Description> <maml:para>Specifies that the registrykey should not be disposed after the properties have been added. This is useful when you need to do multiple operations on a registry key and plan on manually disposing it when done.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Key</maml:name> <maml:Description> <maml:para>The registry keys where the properties should be added. This can either be a string with the registry key path or it can be a Registry key object returned by Get-RegKey.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryKey[]</command:parameterValue> <dev:type> <maml:name>RegistryKey[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Name</maml:name> <maml:Description> <maml:para>The name of of the properties to add.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>Value</maml:name> <maml:Description> <maml:para>The value to add.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>ValueKind</maml:name> <maml:Description> <maml:para>The registry type (String, Dword, etc.) of the value that will be added. By default it is set to Unknown where the cmdlet will find an appropriate type.</maml:para> <maml:para>String and ExpandStrings are handled like this: Null = Empty string Everything else = The result from the ToString method.</maml:para> <maml:para>Binary: Null = Empty byte array String = The unicode representation of the string is converted to bytes. Generic array = Each element is cast to int and then to byte. Int = The int is cast to a byte and saved in a byte array.</maml:para> <maml:para>Dword or Qword: Null = 0</maml:para> <maml:para>MultiString: Null = Empty string array. Generic array = The ToString method is run on every element. Everything else except string arrays = The ToString method is run on the object and put into a single element string array.</maml:para> <maml:para>Unknown or None: Null = Empty String Generic array where first element is an interger = Binary. (Every element is cast to int, then byte). Generic array where first value is a string = MultiString value. (ToString is run on each element).</maml:para> <maml:para>Every other scenario is handled automatically by the underlying SetValue (https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.registrykey.setvalue)method.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryValueKind</command:parameterValue> <dev:type> <maml:name>RegistryValueKind</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Unknown</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Property</maml:name> <maml:Description> <maml:para>The properties to add. This can either be a hashtable with the property names and values, or a [PSRegistry.RegistryProperty] object.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryProperty[]</command:parameterValue> <dev:type> <maml:name>RegistryProperty[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="DontCloseKey, NoDispose"> <maml:name>DontDisposeKey</maml:name> <maml:Description> <maml:para>Specifies that the registrykey should not be disposed after the properties have been added. This is useful when you need to do multiple operations on a registry key and plan on manually disposing it when done.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>Microsoft.Win32.RegistryKey[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------- Example 1 Add a property and value --------------</maml:title> <dev:code>PS C:\> Add-RegKeyProperty -Key "HKEY_CURRENT_USER\Console" -Name InsertMode -Value 1</dev:code> <dev:remarks> <maml:para>Adds the "InsertMode" property to the "HKEY_CURRENT_USER\Console" key with a value of 1. Because the ValueKind has not been specified and the value is an integer the property will be a Dword.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-- Example 2 Add multiple properties at once with a hashtable --</maml:title> <dev:code>PS C:\> Add-RegKeyProperty -Key "HKEY_CURRENT_USER\Console" -Property @{ InsertMode = 1 LineWrap = 1 ScrollScale = 1 FaceName = "Lucida Console" }</dev:code> <dev:remarks> <maml:para>Adds the 4 properties and values from the hashtable to to the "HKEY_CURRENT_USER\Console" key. The first 3 properties will be added as Dword because the value is an integer. The last property will be added as a String because the value is a string.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 3 Add multiple properties with objects that specify the valuekind</maml:title> <dev:code>PS C:\> Add-RegKeyProperty -Key "HKEY_CURRENT_USER\Console" -Property @( [PSRegistry.RegistryProperty]@{ Name = "SomeBinaryValue" Value = @(0,0,1,1,0) ValueKind = [Microsoft.Win32.RegistryValueKind]::Binary } [PSRegistry.RegistryProperty]@{ Name = "SomeMultiStringValue" Value = @("String1","String2") ValueKind = [Microsoft.Win32.RegistryValueKind]::MultiString } )</dev:code> <dev:remarks> <maml:para>Adds the 2 properties and values from the array to the "HKEY_CURRENT_USER\Console" key. This can be used when multiple properties with different types have to be added to a key.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Copy-RegKey</command:name> <command:verb>Copy</command:verb> <command:noun>RegKey</command:noun> <maml:description> <maml:para>Copies a registry key (with subkeys and values) to another key.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This cmdlet copies a source key to one or more destinations using the RegCopyTree (https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regcopytreea)function from winreg.h. The source will be merged into the destination, replacing any existing properties with the source value and type.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Copy-RegKey</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="Source, Path"> <maml:name>Key</maml:name> <maml:Description> <maml:para>The registry key that should be copied. This can either be a string with the registry key path or it can be a Registry key object returned by Get-RegKey.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryKey</command:parameterValue> <dev:type> <maml:name>RegistryKey</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Destination</maml:name> <maml:Description> <maml:para>The registry path where the key should be copied to.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="PSComputerName"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The remote computer for the "Destination" parameter. To specify the computername for the "Key" parameter use Get-RegKey with the ComputerName parameter.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry64</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry32</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="DontCloseKey, NoDispose"> <maml:name>DontDisposeKey</maml:name> <maml:Description> <maml:para>Specifies that the source registry key should not be disposed after copying to the destinations. This is useful when you need to do multiple operations on a registry key and plan on manually disposing it when done.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="Source, Path"> <maml:name>Key</maml:name> <maml:Description> <maml:para>The registry key that should be copied. This can either be a string with the registry key path or it can be a Registry key object returned by Get-RegKey.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryKey</command:parameterValue> <dev:type> <maml:name>RegistryKey</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Destination</maml:name> <maml:Description> <maml:para>The registry path where the key should be copied to.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="PSComputerName"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The remote computer for the "Destination" parameter. To specify the computername for the "Key" parameter use Get-RegKey with the ComputerName parameter.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="DontCloseKey, NoDispose"> <maml:name>DontDisposeKey</maml:name> <maml:Description> <maml:para>Specifies that the source registry key should not be disposed after copying to the destinations. This is useful when you need to do multiple operations on a registry key and plan on manually disposing it when done.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>Microsoft.Win32.RegistryKey</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------- Example 1 Simple copy --------------------</maml:title> <dev:code>PS C:\> Copy-RegKey -Key HKCU:\Console\ -Destination HKCU:\Console2\</dev:code> <dev:remarks> <maml:para>Copies the "HKCU:\Console" key to "HKCU:\Console2".</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>------ Example 2 Copying a local key to a remote computer ------</maml:title> <dev:code>PS C:\> Copy-RegKey -Key HKCU:\Console\ -Destination HKEY_USERS\.DEFAULT\Console -ComputerName Computer1</dev:code> <dev:remarks> <maml:para>Copies the "HKCU:\Console" key from the local machine to "HKEY_USERS\.DEFAULT\Console" on the remote "Computer1" machine.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Dismount-RegHive</command:name> <command:verb>Dismount</command:verb> <command:noun>RegHive</command:noun> <maml:description> <maml:para>Dismounts a mounted registry hive.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This cmdlet dismounts registry hives using the RegUnLoadKey (https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regunloadkeya)function in winreg.h.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Dismount-RegHive</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The path of the registry hive that should be dismounted.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computer where the registry hive should be dismounted from.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry64</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry32</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The path of the registry hive that should be dismounted.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computer where the registry hive should be dismounted from.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------- Example 1 Dismount a registry hive --------------</maml:title> <dev:code>PS C:\> Dismount-RegHive -Path HKLM:\TempMount</dev:code> <dev:remarks> <maml:para>Dismounts the registry hive that was mounted in HKLM:\TempMount on the local computer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--- Example 2 Dismount a registry hive on a remote computer ---</maml:title> <dev:code>PS C:\> Dismount-RegHive -Path HKLM:\TempMount -ComputerName Server1</dev:code> <dev:remarks> <maml:para>Dismounts the registry hive that was mounted in HKLM:\TempMount on the "Server1" computer.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-RegKey</command:name> <command:verb>Get</command:verb> <command:noun>RegKey</command:noun> <maml:description> <maml:para>Gets registry key(s) along with their properties.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Get-RegKey cmdlet retrieves registry keys and properties. The command has several options for how it should read the registry keys that affects performance and what you can do with the registry key objects returned by the cmdlet. The default values for the various options are optimized for making changes to registry keys.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-RegKey</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>Specifies the path to get the registry keys from.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="PSComputerName"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computername to get the key from.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Recurse</maml:name> <maml:Description> <maml:para>Specifies if the cmdlet should get subkeys from each path specified.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Depth</maml:name> <maml:Description> <maml:para>Specifies how deep the command should look for keys when the Recurse parameter is specified. The depth is relative to each input path.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>KeyOnly</maml:name> <maml:Description> <maml:para>Skip getting the properties for each key.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>KeyPermissionCheck</maml:name> <maml:Description> <maml:para>Specifies whether security checks are performed when opening registry keys and accessing their name/value pairs. Default: The registry key inherits the mode of its parent. Security checks are performed when trying to access subkeys or values, unless the parent was opened with ReadSubTree or ReadWriteSubTree mode. ReadSubTree: Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with ReadSubTree or ReadWriteSubTree. ReadWriteSubTree: Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with ReadWriteSubTree.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">ReadSubTree</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">ReadWriteSubTree</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryKeyPermissionCheck</command:parameterValue> <dev:type> <maml:name>RegistryKeyPermissionCheck</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Rights</maml:name> <maml:Description> <maml:para>Specifies the rights used when accessing each key. The default rights allow you to read/write registry keys.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">QueryValues</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">SetValue</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">CreateSubKey</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">EnumerateSubKeys</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Notify</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">CreateLink</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Delete</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">ReadPermissions</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">WriteKey</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">ExecuteKey</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">ReadKey</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">ChangePermissions</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">TakeOwnership</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">FullControl</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryRights</command:parameterValue> <dev:type> <maml:name>RegistryRights</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>EnumerateSubKeys,QueryValues,Notify,SetValue</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry64</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry32</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ValueOptions</maml:name> <maml:Description> <maml:para>Specifies options for how property values should be read.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">None</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">DoNotExpandEnvironmentNames</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryValueOptions</command:parameterValue> <dev:type> <maml:name>RegistryValueOptions</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>Specifies the path to get the registry keys from.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="PSComputerName"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computername to get the key from.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Recurse</maml:name> <maml:Description> <maml:para>Specifies if the cmdlet should get subkeys from each path specified.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Depth</maml:name> <maml:Description> <maml:para>Specifies how deep the command should look for keys when the Recurse parameter is specified. The depth is relative to each input path.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>KeyOnly</maml:name> <maml:Description> <maml:para>Skip getting the properties for each key.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>KeyPermissionCheck</maml:name> <maml:Description> <maml:para>Specifies whether security checks are performed when opening registry keys and accessing their name/value pairs. Default: The registry key inherits the mode of its parent. Security checks are performed when trying to access subkeys or values, unless the parent was opened with ReadSubTree or ReadWriteSubTree mode. ReadSubTree: Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with ReadSubTree or ReadWriteSubTree. ReadWriteSubTree: Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with ReadWriteSubTree.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryKeyPermissionCheck</command:parameterValue> <dev:type> <maml:name>RegistryKeyPermissionCheck</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Rights</maml:name> <maml:Description> <maml:para>Specifies the rights used when accessing each key. The default rights allow you to read/write registry keys.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryRights</command:parameterValue> <dev:type> <maml:name>RegistryRights</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>EnumerateSubKeys,QueryValues,Notify,SetValue</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ValueOptions</maml:name> <maml:Description> <maml:para>Specifies options for how property values should be read.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryValueOptions</command:parameterValue> <dev:type> <maml:name>RegistryValueOptions</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>Microsoft.Win32.RegistryKey</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>---- Example 1 Get a registry key and save it in a variable ----</maml:title> <dev:code>PS C:\> $ConsoleKey=Get-RegKey -Path HKCU:\Console</dev:code> <dev:remarks> <maml:para>Returns the "HKCU:\Console" key with write permissions.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 2 Get a key and its subkeys up to a specific depth without their properties</maml:title> <dev:code>PS C:\> $ConsoleKeys=Get-RegKey -Path HKCU:\Console -KeyOnly -Recurse -Depth 2</dev:code> <dev:remarks> <maml:para>Returns the "HKCU:\Console" key and subkeys up to 2 levels down from the "HKCU:\Console" key. The KeyOnly parameter makes the command skip retrieving the properties from each key.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 3 Get a registry key with only the permissiones required to read the key and properties</maml:title> <dev:code>PS C:\> $ConsoleKeys=Get-RegKey -Path HKCU:\Console -Recurse -KeyPermissionCheck ReadSubTree -Rights EnumerateSubKeys,QueryValues</dev:code> <dev:remarks> <maml:para>Returns the "HKCU:\Console" key and subkeys with the minimum required permissions required for reading.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 4 Take ownership of a key and grant yourself full control permissions</maml:title> <dev:code>PS C:\> $RegKey=Get-RegKey -Path 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AlternateShells' -KeyOnly -KeyPermissionCheck ReadWriteSubTree -Rights TakeOwnership $ACL=$RegKey.GetAccessControl() $ACL.SetOwner([System.Security.Principal.NTAccount]::new("$env:USERNAME")) $RegKey.SetAccessControl($ACL) $RegKey.Dispose() $RegKey=Get-RegKey -Path 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AlternateShells' -KeyOnly -KeyPermissionCheck ReadWriteSubTree -Rights ChangePermissions $ACL.AddAccessRule([System.Security.AccessControl.RegistryAccessRule]::new($env:USERNAME,"FullControl",("ContainerInherit","ObjectInherit"),"none","Allow")) $RegKey.SetAccessControl($ACL) $RegKey.Dispose()</dev:code> <dev:remarks> <maml:para>Takes ownership of a key and grants the user full control. Note that the powershell process needs to have the SeTakeOwnershipPrivilege enabled for this to work.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Mount-RegHive</command:name> <command:verb>Mount</command:verb> <command:noun>RegHive</command:noun> <maml:description> <maml:para>Mounts registry hive files as keys in the registry.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Mount-RegHive cmdlet mounts registry database files as keys using the RegLoadKey (https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regloadkeya)function in winreg.h. This will allow you to make changes to the registry for offline Windows images, or users that aren't logged in.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Mount-RegHive</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="FilePath"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The path to the file containing the registry database that should be mounted. If the command is targeting a remote computer then the path will be relative to that remote computer.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="MountPath"> <maml:name>DestinationPath</maml:name> <maml:Description> <maml:para>The registry key path where the registry hive should be mounted. This can only be a direct subkey from a basekey like "HKLM:\TempMount".</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computer where the registry hive should be mounted.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry64</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry32</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="FilePath"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The path to the file containing the registry database that should be mounted. If the command is targeting a remote computer then the path will be relative to that remote computer.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="MountPath"> <maml:name>DestinationPath</maml:name> <maml:Description> <maml:para>The registry key path where the registry hive should be mounted. This can only be a direct subkey from a basekey like "HKLM:\TempMount".</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computer where the registry hive should be mounted.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------- Example 1 Mount the default user registry file --------</maml:title> <dev:code>PS C:\> Mount-RegHive -Path "C:\Users\Default\NTUSER.DAT" -DestinationPath HKLM:\TempMount</dev:code> <dev:remarks> <maml:para>Mounts the default user registry hive to the HKLM:\TempMount key.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-RegKey</command:name> <command:verb>New</command:verb> <command:noun>RegKey</command:noun> <maml:description> <maml:para>Creates new registry keys.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The New-RegKey cmdlet creates new registry keys. If a key already exists the key will be written to the pipeline the same way it would with non-existing keys. A custom ACL can be set for newly created keys but it will not change the ACL for keys that already exist. Keys can be created as volatile, meaning that they will be deleted when the computer is shutdown or restarted.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-RegKey</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The full path to the key that should be created.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="PSComputerName"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computer where the registry key should be created.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>KeyPermissionCheck</maml:name> <maml:Description> <maml:para>Specifies whether security checks are performed when opening registry keys and accessing their name/value pairs. Default: The registry key inherits the mode of its parent. Security checks are performed when trying to access subkeys or values, unless the parent was opened with ReadSubTree or ReadWriteSubTree mode. ReadSubTree: Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with ReadSubTree or ReadWriteSubTree. ReadWriteSubTree: Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with ReadWriteSubTree.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">ReadSubTree</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">ReadWriteSubTree</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryKeyPermissionCheck</command:parameterValue> <dev:type> <maml:name>RegistryKeyPermissionCheck</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry64</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry32</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Options</maml:name> <maml:Description> <maml:para>Allows you to specify that the key is "Volatile" meaning that it will be deleted when the registry hive is unloaded.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">None</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Volatile</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryOptions</command:parameterValue> <dev:type> <maml:name>RegistryOptions</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ACL</maml:name> <maml:Description> <maml:para>Specifies a custom ACL to set on the newly created key. Note: If the key already exists the ACL will not change.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistrySecurity</command:parameterValue> <dev:type> <maml:name>RegistrySecurity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The full path to the key that should be created.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="PSComputerName"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computer where the registry key should be created.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>KeyPermissionCheck</maml:name> <maml:Description> <maml:para>Specifies whether security checks are performed when opening registry keys and accessing their name/value pairs. Default: The registry key inherits the mode of its parent. Security checks are performed when trying to access subkeys or values, unless the parent was opened with ReadSubTree or ReadWriteSubTree mode. ReadSubTree: Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with ReadSubTree or ReadWriteSubTree. ReadWriteSubTree: Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with ReadWriteSubTree.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryKeyPermissionCheck</command:parameterValue> <dev:type> <maml:name>RegistryKeyPermissionCheck</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Options</maml:name> <maml:Description> <maml:para>Allows you to specify that the key is "Volatile" meaning that it will be deleted when the registry hive is unloaded.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryOptions</command:parameterValue> <dev:type> <maml:name>RegistryOptions</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ACL</maml:name> <maml:Description> <maml:para>Specifies a custom ACL to set on the newly created key. Note: If the key already exists the ACL will not change.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistrySecurity</command:parameterValue> <dev:type> <maml:name>RegistrySecurity</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>Microsoft.Win32.RegistryKey</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>------------- Example 1 Create a new registry key -------------</maml:title> <dev:code>PS C:\> New-RegKey -Path HKEY_LOCAL_MACHINE\SOFTWARE\SomeSoftware</dev:code> <dev:remarks> <maml:para>Create the new registry key "HKEY_LOCAL_MACHINE\SOFTWARE\SomeSoftware".</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 2 Create a new volatile registry key ---------</maml:title> <dev:code>PS C:\> New-RegKey -Path HKEY_LOCAL_MACHINE\SOFTWARE\SomeSoftware\TempKey -Options Volatile</dev:code> <dev:remarks> <maml:para>Create a volatile key "HKEY_LOCAL_MACHINE\SOFTWARE\SomeSoftware\TempKey" that will be deleted when the registry hive is unloaded (when the computer is shutdown/rebooted).</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Remove-RegKey</command:name> <command:verb>Remove</command:verb> <command:noun>RegKey</command:noun> <maml:description> <maml:para>Deletes registry keys.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Remove-RegKey cmdlet deletes registry keys. If the Recurse parameter is not specified the cmdlet will not delete keys that contain subkeys.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-RegKey</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="0" aliases="Name"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The registry key that should be deleted.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="1" aliases="none"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computer where the registry key should be deleted.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Recurse</maml:name> <maml:Description> <maml:para>Allows the cmdlet to delete registry keys that contain subkeys. If this is not set and a specified key contains subkeys the cmdlet will write an error and skip that key.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">Default</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry64</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Registry32</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="0" aliases="Name"> <maml:name>Path</maml:name> <maml:Description> <maml:para>The registry key that should be deleted.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="1" aliases="none"> <maml:name>ComputerName</maml:name> <maml:Description> <maml:para>The computer where the registry key should be deleted.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Recurse</maml:name> <maml:Description> <maml:para>Allows the cmdlet to delete registry keys that contain subkeys. If this is not set and a specified key contains subkeys the cmdlet will write an error and skip that key.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>View</maml:name> <maml:Description> <maml:para>Specifies the registry view to target. This allows you view the registry like a 32-bit application would on a 64-bit OS.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryView</command:parameterValue> <dev:type> <maml:name>RegistryView</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Default</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>Example 1 Delete a registry key along with any subkeys it may have</maml:title> <dev:code>PS C:\> Remove-RegKey -Path HKEY_LOCAL_MACHINE\SOFTWARE\SomeSoftware -Recurse</dev:code> <dev:remarks> <maml:para>Deletes the HKEY_LOCAL_MACHINE\SOFTWARE\SomeSoftware registry key along with any subkeys.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Remove-RegKeyProperty</command:name> <command:verb>Remove</command:verb> <command:noun>RegKeyProperty</command:noun> <maml:description> <maml:para>Deletes registry properties</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Remove-RegKeyProperty cmdlet deletes registry key properties.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-RegKeyProperty</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Key</maml:name> <maml:Description> <maml:para>The registry keys where the properties should be removed. This can either be a string with the registry key path or it can be a Registry key object returned by Get-RegKey.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryKey[]</command:parameterValue> <dev:type> <maml:name>RegistryKey[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="Name"> <maml:name>PropertyName</maml:name> <maml:Description> <maml:para>The properties to remove.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="DontCloseKey, NoDispose"> <maml:name>DontDisposeKey</maml:name> <maml:Description> <maml:para>Specifies that the registrykey should not be disposed after the properties have been deleted. This is useful when you need to do multiple operations on a registry key and plan on manually disposing it when done.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Key</maml:name> <maml:Description> <maml:para>The registry keys where the properties should be removed. This can either be a string with the registry key path or it can be a Registry key object returned by Get-RegKey.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">RegistryKey[]</command:parameterValue> <dev:type> <maml:name>RegistryKey[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="Name"> <maml:name>PropertyName</maml:name> <maml:Description> <maml:para>The properties to remove.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="DontCloseKey, NoDispose"> <maml:name>DontDisposeKey</maml:name> <maml:Description> <maml:para>Specifies that the registrykey should not be disposed after the properties have been deleted. This is useful when you need to do multiple operations on a registry key and plan on manually disposing it when done.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>Microsoft.Win32.RegistryKey[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>----------- Example 1 Remove a property from a key. -----------</maml:title> <dev:code>PS C:\> Remove-RegKeyProperty -Key HKEY_CURRENT_USER\SomeKey -PropertyName "SomeProperty"</dev:code> <dev:remarks> <maml:para>Removes the "SomeProperty" property from "HKEY_CURRENT_USER\SomeKey".</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>------- Example 2 Remove the default property for a key. -------</maml:title> <dev:code>PS C:\> Remove-RegKeyProperty -Key HKEY_CURRENT_USER\SomeKey -PropertyName ""</dev:code> <dev:remarks> <maml:para>Removes the default property from "HKEY_CURRENT_USER\SomeKey".</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |