fleet/it-and-security/lib/windows/scripts/create-admin-user.ps1

13 lines
577 B
PowerShell
Raw Normal View History

2025-03-19 18:35:39 +00:00
# Please don't delete. This script is referenced in the guide here: https://fleetdm.com/guides/enforce-disk-encryption
$Username = "IT admin"
$Password = ConvertTo-SecureString "StrongPassword123!" -AsPlainText -Force
# Create the local user account
New-LocalUser -Name $Username -Password $Password -FullName "Fleet IT admin"
-Description "Admin account used to login when the end user forgets their
password or the host is returned to Fleet."
-AccountNeverExpires
# Add the user to the Administrators group
Add-LocalGroupMember -Group "Administrators" -Member $Username