Allow skipping the User
parameter
This commit is contained in:
parent
091ce4ba61
commit
a219a15a5c
|
@ -78,10 +78,11 @@ $null = New-Module {
|
||||||
[Parameter(ParameterSetName="User", Mandatory)]
|
[Parameter(ParameterSetName="User", Mandatory)]
|
||||||
[switch] $User,
|
[switch] $User,
|
||||||
[Parameter(ParameterSetName="User")]
|
[Parameter(ParameterSetName="User")]
|
||||||
|
[Parameter(ParameterSetName="SpecificUser", Mandatory)]
|
||||||
[RegistryKey] $UserKey
|
[RegistryKey] $UserKey
|
||||||
)
|
)
|
||||||
|
|
||||||
if ($User.IsPresent) {
|
if ($User.IsPresent -or $UserKey) {
|
||||||
if (-not $UserKey) {
|
if (-not $UserKey) {
|
||||||
$UserKey = Get-Item "HKCU:\";
|
$UserKey = Get-Item "HKCU:\";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue