PowerShell LocalAccounts Cmdlets Missing in Windows

If a Windows script says Get-LocalUser is missing or reports an error naming Microsoft.PowerShell.LocalAccounts.dll, check which PowerShell process actually ran the command. A 64-bit Windows installation can run a 32-bit process. Record the current shell and the exact error before trying to repair the module.
Start with the symptom
- Check the shell edition, version and architecture.
- Check whether the exact module is visible.
- Confirm one read-only result in the intended shell.
What Microsoft.PowerShell.LocalAccounts.dll is
The Windows file inventory records the file as LocalAccounts. Microsoft’s LocalAccounts module reference describes supported local-user and group cmdlets. It specifically notes that the module is unavailable in 32-bit PowerShell on a 64-bit system. Verify that distinction before searching for a replacement assembly.
1. Check the process that ran the command
- In the affected shell, run the read-only comparisons
$PSVersionTable.PSVersionand[Environment]::Is64BitProcess. Record whether the second result is True or False. Compare that with the system type under Settings → System → About. Those observations describe different things. - Record whether the shell was opened directly, launched by another app or started by an approved scheduled task. For an automated workflow, have the administrator check which executable it calls. A command can work in your normal shell and be unavailable in the process that launches the script.
- Open a supported 64-bit PowerShell host on 64-bit Windows using your approved route, then repeat the architecture check. Preserve the original script, execution policy and account settings while comparing the hosts.
Example. The command works from Start but the organization’s inventory job says it cannot find it. The interactive shell is 64-bit and the job uses a 32-bit host. Record both results for the job owner. After they update the approved launcher, run the same read-only check inside the job and compare the new process architecture.
2. Check module discovery before loading anything else
- From the supported shell, run
Get-Module -ListAvailable -Name Microsoft.PowerShell.LocalAccounts. This reads which matching modules PowerShell can see. Microsoft’s Get-Module reference explains the ListAvailable output. - If the module appears, check that the cmdlet resolves in that same shell. If the module is absent or produces a load error, record the full message, shell version and Windows build. Confirm the expected Windows and PowerShell configuration with the administrator before changing anything.
- If you manage the PC and Windows separately reports protected system file corruption, follow Microsoft’s supported system repair. On a work PC, let IT confirm the expected host and installed Windows components first.
Example. The module is visible in an approved interactive session but missing from an app’s embedded PowerShell. Ask the app owner which host and execution environment it uses. Send the module discovery result and version without copying account names or environment secrets into a public report. Reproduce the comparison in the actual session that failed.
If the cmdlet is visible and returns an access error, record that separately. Command discovery answers whether the supported shell knows the command. The later query is a different check, controlled by the account, host and organization’s permissions. Use the approved support route for the permission error. An account shown in an organization’s directory may not be listed as a local account by this cmdlet.
A result from an integrated development terminal may differ from the result of a job on the same PC. Record the name of the executable, whether it ran as the normal user or a managed account, and the exact error. Keep both results so the job owner can verify their correction in the expected environment. Once the supported shell is confirmed, repeating the module lookup in the same session is a safer check than searching the Internet for loose DLL files.
Read the first error from the same process that ran the script. A command that PowerShell cannot find, a module that cannot load, and an account lookup that returns no matching result are three different stages. Copy the error category and message. If the script catches the original error and prints its own short message, use its approved detailed logging or reproduce just the read-only command in the same supported shell.
After confirming the module is listed, you can use Get-Command Get-LocalUser to check whether that name resolves. Microsoft’s Get-Command reference explains command discovery and automatic module import. If the name resolves, record the source module shown. If an approved wrapper or profile changes command resolution, ask the script owner to compare its supported config with a normal approved session.
Keep the scope of the result explicit. Run the check on the intended PC and note whether the command was launched on that computer or from an administrator’s different workstation. A successful local query elsewhere does not describe this device. In a managed environment, avoid sending a complete account list. The command name, version and success or failure are often enough to diagnose a missing module.
If the shell changes after an update, repeat the architecture and module checks before running the whole script again. The first observable improvement is that the expected command resolves in the original workflow.
Verify the intended local account query
If authorized, use Get-LocalUser in the supported session to read the expected local account information. Microsoft’s Get-LocalUser documentation describes its scope. Compare with the original approved read-only operation. Keep account details private in support tickets unless required by your organization. For a separate work account connection issue, use the device enrollment guide.