TestimoX

API Reference

Command

Get-CxRegistryValue

Namespace ComputerX.PowerShell
Outputs
ComputerX.Registry.RegistryReader+ValueResult

Returns a registry value from the local or a remote computer.

Examples

Authored help example

Example 1: Reads the local Windows installation path from the registry.

PS>


Get-CxRegistryValue -Path 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name SystemRoot
        

Example 2: Reads and expands a remote service image path that uses environment variables.

PS>


Get-CxRegistryValue -ComputerName APP01 -Path 'HKLM\SYSTEM\CurrentControlSet\Services\Schedule' -Name ImagePath -ExpandEnvironment
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Get-CxRegistryValue -Path <string> [-Name <string>] [-ComputerName <string>] [-ExpandEnvironment] [<CommonParameters>]
#

Parameters

Path string requiredposition: 0pipeline: false
Registry key path that contains the value to read, for example HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion.
Name string optionalposition: 1pipeline: false
Name of the registry value to read. Leave this empty only when the target key uses the default unnamed value.
ComputerName string optionalposition: 2pipeline: false
Target computer name. Use . for the local machine or provide a DNS/NetBIOS name. When omitted, the local computer is queried.
ExpandEnvironment SwitchParameter optionalposition: namedpipeline: false
Expands embedded environment variables when the target value contains expandable strings.

Outputs

ComputerX.Registry.RegistryReader+ValueResult