UniversalDsc.Resource.Windows.User 0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global UniversalDsc.Resource.Windows.User --version 0.1.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local UniversalDsc.Resource.Windows.User --version 0.1.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=UniversalDsc.Resource.Windows.User&version=0.1.1
                    
nuke :add-package UniversalDsc.Resource.Windows.User --version 0.1.1
                    

UniversalDsc.Resource.Windows.User

A Universal DSC Resource for managing Windows local user accounts. This resource provides management of Windows local users through Microsoft Desired State Configuration (DSC) v3 or running the executable standalone.

Features

  • Create, update, and delete local Windows user accounts
  • Manage user properties: full name, description, password
  • Configure account settings: enabled/disabled state, password expiration, password change requirements
  • Full integration with DSC v3 framework
  • Support for Get, Set, and Test operations

Available package

Package Platforms Description
UniversalDsc.Resource.Windows.User Windows DSC v3 resource for managing Windows local user accounts

Usage

Installation

dotnet tool install UniversalDsc.Resource.Windows.User --global

dotnet tool install UniversalDsc.Resource.Windows.User --tool-path mytools

Microsoft DSC v3 integration

The windows-user.exe can be executed through Microsoft DSC v3. Using dotnet.exe tool install doesn't automatically copy the windows-user.dsc.resource.json to the root directory. If you manually copy the file in the root, the DSC engine can pick it up.

The following code snippet can be run after the tool is installed:

$rootPath = Join-Path $env:USERPROFILE -ChildPath '.dotnet' -AdditionalChildPath 'tools'
$storePath = Join-Path $rootPath -ChildPath '.store' -AdditionalChildPath 'universaldsc.resource.windows.user'

$manifestFile = Get-ChildItem -Path $storePath -Recurse -Filter *.dsc.resource.json | Select-Object -First 1
Copy-Item -Path $manifestFile -Destination $rootPath

Configuration document example

The following example shows you how you can run a configuration document through dsc.exe:

# user.dsc.config.yaml
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
  - name: TestUser
    type: UniversalDsc.Windows/user
    properties:
      username: testuser
      fullName: Test User
      description: Test user account
      disabled: false
      passwordNeverExpires: false
      passwordChangeRequired: true

Run the following command to execute dsc.exe if you have it installed:

dsc config get --file user.dsc.config.yaml

Properties

  • userName (required): The username for the local user account
  • fullName (optional): The full display name for the user
  • description (optional): Description for the user account
  • password (optional): Password for the user account
  • disabled (optional): Whether the account is disabled (true/false)
  • passwordNeverExpires (optional): Whether the password never expires (true/false)
  • passwordChangeRequired (optional): Whether password change is required at next logon (true/false)
  • passwordChangeNotAllowed (optional): Whether the user can change their password (true/false)
  • exist (optional): Whether the user should exist (true/false, defaults to true)

Additional Information

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.3 209 8/15/2025
0.1.2 85 8/2/2025
0.1.1 168 7/31/2025
0.1.0 151 7/31/2025

Added icon to the package