Private/Get-RegistryKey.ps1
function Get-RegistryKey { <# .SYNOPSIS Retrieves a registry key. .PARAMETER Path The path to the registry key to be opened. Must include the registry hive. #> [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $Path ) if (Test-RegistryKeyExists -Path $Path) { $Items = Get-ItemProperty -Path "Registry::$Path" return $Items } } |