mirror of
https://github.com/fleetdm/fleet
synced 2026-05-16 21:48:48 +00:00
Feature branch for the #9949 story. --------- Co-authored-by: Jahziel Villasana-Espinoza <jahziel@fleetdm.com> Co-authored-by: Roberto Dip <me@roperzh.com> Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com> Co-authored-by: Sarah Gillespie <sarah@fleetdm.com>
14 lines
395 B
PowerShell
14 lines
395 B
PowerShell
# PowerShell script to enable all disabled local user accounts
|
|
|
|
# Get all local user accounts
|
|
$localUsers = Get-LocalUser
|
|
|
|
# Enable each disabled user account
|
|
foreach ($user in $localUsers) {
|
|
if ($user.Enabled -eq $false) {
|
|
Enable-LocalUser -Name $user.Name
|
|
Write-Host "Enabled user account: $($user.Name)"
|
|
}
|
|
}
|
|
|
|
Write-Host "All disabled user accounts have been enabled."
|