API Reference
Command
Get-CxRegistryValue
Returns a registry value from the local or a remote computer.
Examples
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
- Registry key path that contains the value to read, for example HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion.
- Name string
- Name of the registry value to read. Leave this empty only when the target key uses the default unnamed value.
- ComputerName string
- Target computer name. Use . for the local machine or provide a DNS/NetBIOS name. When omitted, the local computer is queried.
- ExpandEnvironment SwitchParameter
- Expands embedded environment variables when the target value contains expandable strings.
Outputs
ComputerX.Registry.RegistryReader+ValueResult