Create separate option holding win users
This commit is contained in:
parent
e185bbe3c9
commit
6f2e9b894e
4 changed files with 78 additions and 16 deletions
scripts/Common/Scripts
|
@ -164,6 +164,14 @@ $null = New-Module {
|
|||
return "valhalla.$($IsWindows ? "windows" : "linux")";
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets the name of the user root.
|
||||
#>
|
||||
function Get-UserRootName {
|
||||
return "$(Get-ConfigRootName).$($IsWindows ? "winUsers" : "users")";
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets a user configuration.
|
||||
|
@ -182,7 +190,7 @@ $null = New-Module {
|
|||
)
|
||||
|
||||
if ((Get-Users) -contains $UserName) {
|
||||
Get-Config "$(Get-ConfigRootName).users.$UserName.$Name";
|
||||
Get-Config "$(Get-UserRootName).$UserName.$Name";
|
||||
} else {
|
||||
return $null;
|
||||
}
|
||||
|
@ -210,7 +218,7 @@ $null = New-Module {
|
|||
function Get-Users {
|
||||
[OutputType([string[]])]
|
||||
param()
|
||||
Get-Attributes "$(Get-ConfigRootName).users";
|
||||
Get-Attributes "$(Get-UserRootName)";
|
||||
}
|
||||
|
||||
<#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue