Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: explicitly import LocalAccounts module in PowerShell Set-AdminPa…
…ssword
  • Loading branch information
DevelopmentCats committed Oct 27, 2025
commit aa3fbe921734f9b1059d8e94c54a4c4d58e91d44
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ function Set-AdminPassword {
param (
[string]$adminPassword
)
# Explicitly import LocalAccounts module
Import-Module Microsoft.PowerShell.LocalAccounts -ErrorAction SilentlyContinue

# Set admin password
Get-LocalUser -Name "${admin_username}" | Set-LocalUser -Password (ConvertTo-SecureString -AsPlainText $adminPassword -Force)
# Enable admin user
Expand Down