# Create a Local Administrator Account on Windows

## Description

Use this Fileset recipe to create a named local administrator account on managed Windows devices. The download includes separate PowerShell scripts for account creation and removal, with environment variables for the username, password, and full name.

## Ingredients

- FileWave Central
- [Create Local Admin (Win).fileset.zip](https://kb.filewave.com/attachments/458)

## Directions

1. Download and unzip the Fileset
2. Import the Fileset into your server with FileWave Central.
3. Select the Fileset, then open its **Scripts** view.
4. Select `create_admin.ps1` to open the script properties[![CreateLocalAdminWindows1.png](https://kb.filewave.com/uploads/images/gallery/2025-05/scaled-1680-/z14tpdmUAzWPceCJ-createlocaladminwindows1.png)](https://kb.filewave.com/uploads/images/gallery/2025-05/z14tpdmUAzWPceCJ-createlocaladminwindows1.png)
5. Enter in your local admin Username, Password and Full Name for the desired account[![CreateLocalAdminWindows2.png](https://kb.filewave.com/uploads/images/gallery/2025-05/scaled-1680-/o0TrOjg4xVqrx9UA-createlocaladminwindows2.png)](https://kb.filewave.com/uploads/images/gallery/2025-05/o0TrOjg4xVqrx9UA-createlocaladminwindows2.png)
6. Repeat the process for the remove\_admin.ps1 and enter in the desired Username to remove  
      
    <p class="callout danger">**Removal deletes local data.** The `USERNAME` environment variable in `remove_admin.ps1` must exactly match the account name. The included removal script deletes the local account and recursively deletes `C:\Users\<Username>` when that profile directory exists. Test with a disposable account and confirm that no required user data remains before deployment.  
    </p>
    
    [![CreateLocalAdminWindows3.png](https://kb.filewave.com/uploads/images/gallery/2025-05/scaled-1680-/9nhmtCVgR3ZSi3H7-createlocaladminwindows3.png)](https://kb.filewave.com/uploads/images/gallery/2025-05/9nhmtCVgR3ZSi3H7-createlocaladminwindows3.png)
7. Close the Script window to Save
8. Assign to a test device
9. Perform a Model Update to deploy

To confirm account creation, open **Windows Settings &gt; Accounts &gt; Other users** and verify that the new local administrator appears.[![CreateLocalAdminWindows4.png](https://kb.filewave.com/uploads/images/gallery/2025-05/scaled-1680-/qgG47jNZwddxGLMb-createlocaladminwindows4.png)](https://kb.filewave.com/uploads/images/gallery/2025-05/qgG47jNZwddxGLMb-createlocaladminwindows4.png)

## Notes

Both scripts will output their executed tasks for detailed logging. These logs may be found in:

```
C:\ProgramData\FileWave\Logs\
```

The create\_admin script log will be labeled: **CreateLocalUser\_FromEnv.log**

**[![CreateLocalAdminWindows8.png](https://kb.filewave.com/uploads/images/gallery/2025-05/scaled-1680-/65j9SWZh97u34Mva-createlocaladminwindows8.png)](https://kb.filewave.com/uploads/images/gallery/2025-05/65j9SWZh97u34Mva-createlocaladminwindows8.png)**

The remove\_admin script log will be labeled: **RemoveLocalUser\_FullCleanup.log**

**[![CreateLocalAdminWindows6.png](https://kb.filewave.com/uploads/images/gallery/2025-05/scaled-1680-/4OM4U2Shyj17QGbg-createlocaladminwindows6.png)](https://kb.filewave.com/uploads/images/gallery/2025-05/4OM4U2Shyj17QGbg-createlocaladminwindows6.png)**

The creation script skips the operation when an account with the specified username already exists; it does not replace or update that existing account.

[![CreateLocalAdminWindows5.png](https://kb.filewave.com/uploads/images/gallery/2025-05/scaled-1680-/szix0dZGuPB2GaXD-createlocaladminwindows5.png)](https://kb.filewave.com/uploads/images/gallery/2025-05/szix0dZGuPB2GaXD-createlocaladminwindows5.png)

## Related Content

- [How to Create Local User Accounts on macOS](https://kb.filewave.com/books/macos/page/how-to-create-local-user-accounts-on-macos-1015)