PowerShell Logo Small

Get-GPRegistryValue



This is the built-in help made by Microsoft for the command 'Get-GPRegistryValue', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Retrieves one or more registry-based policy settings under either Computer Configuration or User Configuration in a GPO.

SYNTAX


Get-GPRegistryValue [-Domain <String>] [-Server <String>] [-ValueName <String>] -Guid <Guid> -Key <String> [<CommonParameters>]
Get-GPRegistryValue [-Name] <String> [-Domain <String>] [-Server <String>] [-ValueName <String>] -Key <String> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-GPRegistryValue cmdlet retrieves one or more registry-based policy settings under either Computer Configuration or User Configuration in a GPO.


You can retrieve registry-based policy settings for a specific registry value, or for all the registry values under a key:

-- To retrieve the registry-based policy setting that configures a specific registry value, specify both the Key and the ValueName parameters.

-- To retrieve all the registry-based policy settings that configure values directly under a registry key, specify the Key parameter without the ValueName parameter.


If you specify only a key, in addition to the policy settings that configure values under the key, the following first-level subkeys of the key are returned:

-- first-level subkeys that have a policy setting that configures a value.

-- first-level subkeys that have a subkey (at any level) with a policy setting that configures a value.

You can use this information to browse for registry-based policy settings.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?linkid=287719
Remove-GPRegistryValue
Set-GPRegistryValue

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

C:\PS>Get-GPRegistryValue -Name TestGPO -Key HKCU\Software\Policies\Microsoft\ExampleKey -ValueName ValueOne

KeyPath : Software\Policies\Microsoft\ExampleKey
FullKeyPath : HKEY_CURRENT_USER\Software\Policies\Microsoft\ExampleKey
Hive : CurrentUser
PolicyState : Set
Value : DataString 1
Type : String
ValueName : ValueOne
HasValue : True



Description

-----------

This command retrieves the registry-based policy setting that configures the registry value "HKEY_CURRENT_USER\Software\Policies\Microsoft\ExampleKey ValueOne" from User
Configuration in the "TestGPO" GPO.




-------------------------- EXAMPLE 2 --------------------------

C:\PS>Get-GPRegistryValue -Name TestGPO -Key HKCU\Software\Policies\Microsoft\ExampleKey

KeyPath : Software\Policies\Microsoft\ExampleKey
FullKeyPath : HKEY_CURRENT_USER\Software\Policies\Microsoft\ExampleKey
Hive : CurrentUser
PolicyState : Set
Value : DataString 1
Type : String
ValueName : ValueOne
HasValue : True

KeyPath : Software\Policies\Microsoft\ExampleKey
FullKeyPath : HKEY_CURRENT_USER\Software\Policies\Microsoft\ExampleKey
Hive : CurrentUser
PolicyState : Delete
Value :
Type : String
ValueName : ValueTwo
HasValue : True


KeyPath : Software\Policies\Microsoft\ExampleKey\Subkey1
FullKeyPath : HKEY_CURRENT_USER\Software\Policies\Microsoft\ExampleKey\Subkey1
Hive : CurrentUser

KeyPath : Software\Policies\Microsoft\ExampleKey\SubKey2
FullKeyPath : HKEY_CURRENT_USER\Software\Policies\Microsoft\ExampleKey\SubKey2
Hive : CurrentUser



Description

-----------

This command retrieves all the registry-based policy settings that configure registry values under the key "HKEY_CURRENT_USER\Software\Policies\Microsoft\ExampleKey" from
User Configuration in the "TestGPO" GPO. Subkeys (of this key) that have registry-based policy settings, are also returned. The second registry-based policy setting
(ValueTwo) is disabled (its PolicyState property is set to Delete).