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