{"id":15150503,"url":"https://github.com/snikalaichyk/cuserrightsassignment","last_synced_at":"2025-09-29T19:30:45.443Z","repository":{"id":57667073,"uuid":"49777356","full_name":"SNikalaichyk/cUserRightsAssignment","owner":"SNikalaichyk","description":"The cUserRightsAssignment DSC resource module.","archived":true,"fork":false,"pushed_at":"2018-10-12T14:44:57.000Z","size":21,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-09-21T21:03:50.717Z","etag":null,"topics":["dsc","dsc-resources","powershell","powershell-dsc","powershell-modules"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SNikalaichyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-16T14:48:42.000Z","updated_at":"2023-06-05T16:22:01.000Z","dependencies_parsed_at":"2022-09-02T14:10:56.773Z","dependency_job_id":null,"html_url":"https://github.com/SNikalaichyk/cUserRightsAssignment","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SNikalaichyk%2FcUserRightsAssignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SNikalaichyk%2FcUserRightsAssignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SNikalaichyk%2FcUserRightsAssignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SNikalaichyk%2FcUserRightsAssignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SNikalaichyk","download_url":"https://codeload.github.com/SNikalaichyk/cUserRightsAssignment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219874673,"owners_count":16554606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dsc","dsc-resources","powershell","powershell-dsc","powershell-modules"],"created_at":"2024-09-26T14:20:25.189Z","updated_at":"2025-09-29T19:30:45.137Z","avatar_url":"https://github.com/SNikalaichyk.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/wd1lvxj75hrvbfp7?svg=true)](https://ci.appveyor.com/project/SNikalaichyk/cuserrightsassignment)\n\n# cUserRightsAssignment\nThe **cUserRightsAssignment** module contains the **cUserRight** DSC resource that provides a mechanism to manage user rights: logon rights and privileges.\n\nYou can also download this module from the [PowerShell Gallery](https://www.powershellgallery.com/packages/cUserRightsAssignment).\n\n## Resources\n\n### cUserRight\n\nThe **cUserRight** DSC resource provides a mechanism to manage user rights: logon rights and privileges.\n\n* **Ensure**: Indicates if the user right is assigned. Set this property to `Absent` to ensure that the user right is not assigned.\n    Setting it to `Present` (the default value) ensures that the user right is assigned.\n* **Constant**: Indicates the constant name that is associated with a user right.\n    For the list of available constants, see [User Rights Assignment](https://technet.microsoft.com/en-us/library/dn221963.aspx).\n* **Principal**: Indicates the identity of the principal. Valid formats are:\n    * [Down-Level Logon Name](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380525%28v=vs.85%29.aspx#down_level_logon_name)\n    * [Security Accounts Manager (SAM) Account Name (sAMAccountName)](https://msdn.microsoft.com/en-us/library/windows/desktop/ms679635%28v=vs.85%29.aspx)\n    * [User Principal Name (UPN)](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380525%28v=vs.85%29.aspx#user_principal_name)\n\n## Versions\n\n### 1.0.2 (February 19, 2016)\n\n* General improvements.\n\n### 1.0.1 (February 2, 2016)\n\n* General improvements.\n\n### 1.0.0 (January 18, 2016)\n\n* Initial release with the following DSC resources:\n    * **cUserRight**\n\n## Examples\n\n### Assign logon rights\n\nThis example shows how to use the **cUserRight** DSC resource to assign logon rights.\n\n```powershell\n\nConfiguration Sample_cUserRight\n{\n    Import-DscResource -ModuleName cUserRightsAssignment\n\n    # Ensure the 'Log on as a service' logon right is assigned to the local 'Power Users' group.\n    cUserRight GrantServiceLogonRight\n    {\n        Ensure = 'Present'\n        Constant = 'SeServiceLogonRight'\n        Principal = 'BUILTIN\\Power Users'\n    }\n\n    # Ensure the 'Log on as a batch job' logon right is not assigned to the local 'Power Users' group.\n    cUserRight RevokeBatchLogonRight\n    {\n        Ensure = 'Absent'\n        Constant = 'SeBatchLogonRight'\n        Principal = 'BUILTIN\\Power Users'\n    }\n}\n\n$OutputPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'Sample_cUserRight'\nSample_cUserRight -OutputPath $OutputPath\nStart-DscConfiguration -Path $OutputPath -Force -Verbose -Wait\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnikalaichyk%2Fcuserrightsassignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnikalaichyk%2Fcuserrightsassignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnikalaichyk%2Fcuserrightsassignment/lists"}