Set user groups properly
This commit is contained in:
parent
4f2781b154
commit
3ad0fcf95e
|
@ -13,6 +13,7 @@
|
|||
|
||||
users.Manuel = {
|
||||
microsoftAccount = true;
|
||||
groups = ["Administrators"];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -530,6 +530,10 @@ $null = New-Module {
|
|||
$configure = {
|
||||
Deploy-SoftwareAction -Action ([InstallerAction]::ConfigureUser);
|
||||
Remove-LocalGroupMember -Member "$user" @adminGroup -ErrorAction SilentlyContinue;
|
||||
|
||||
foreach ($group in Get-UserConfig -UserName "$user" "groups") {
|
||||
Add-LocalGroupMember -Member "$user" -Name "$group";
|
||||
}
|
||||
}
|
||||
|
||||
if ($msAccount) {
|
||||
|
|
Loading…
Reference in a new issue