{"id":19504978,"url":"https://github.com/tools4everbv/helloid-task-sa-target-activedirectory-accountcreate","last_synced_at":"2025-07-26T10:33:12.091Z","repository":{"id":66877032,"uuid":"604150092","full_name":"Tools4everBV/HelloID-Task-SA-Target-ActiveDirectory-AccountCreate","owner":"Tools4everBV","description":"Active Directory - User account create","archived":false,"fork":false,"pushed_at":"2024-01-09T15:12:58.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-13T09:44:20.953Z","etag":null,"topics":["active-directory","delegated-form","powershell","product","service-automation","task"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tools4everBV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-20T12:48:23.000Z","updated_at":"2024-01-09T09:35:41.000Z","dependencies_parsed_at":"2023-02-22T22:30:24.746Z","dependency_job_id":"63e7be05-46ee-44da-837e-943489a056ea","html_url":"https://github.com/Tools4everBV/HelloID-Task-SA-Target-ActiveDirectory-AccountCreate","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Tools4everBV/HelloID-Task-SA-Target-ActiveDirectory-AccountCreate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Task-SA-Target-ActiveDirectory-AccountCreate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Task-SA-Target-ActiveDirectory-AccountCreate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Task-SA-Target-ActiveDirectory-AccountCreate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Task-SA-Target-ActiveDirectory-AccountCreate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tools4everBV","download_url":"https://codeload.github.com/Tools4everBV/HelloID-Task-SA-Target-ActiveDirectory-AccountCreate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Task-SA-Target-ActiveDirectory-AccountCreate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267150408,"owners_count":24043473,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["active-directory","delegated-form","powershell","product","service-automation","task"],"created_at":"2024-11-10T22:27:57.636Z","updated_at":"2025-07-26T10:33:12.009Z","avatar_url":"https://github.com/Tools4everBV.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HelloID-Task-SA-Target-ActiveDirectory-AccountCreate\n\n## Prerequisites\n\n- [ ] The HelloID SA on-premises agent installed\n\n- [ ] The `ActiveDirectory` module is installed on the server where the HelloID SA on-premises agent is running.\n\n## Description\n\nThis code snippet will create a new user within Active Directory and executes the following tasks:\n\n1. Define a hash table `$formObject`. The keys of the hash table represent the properties of the `New-ADUser` cmdlet, while the values represent the values entered in the form.\n\n\u003e To view an example of the form output, please refer to the JSON code pasted below.\n\n```json\n{\n    \"Path\": \"\",\n    \"ChangePasswordAtLogon\": true,\n    \"PasswordNotRequired\": true,\n    \"Surname\": \"\",\n    \"Description\": \"\",\n    \"UserPrincipalName\": \"\",\n    \"GivenName\": \"\",\n    \"Name\": \"\",\n    \"Title\": \"\",\n    \"SamAccountName\": \"\",\n    \"AccountPassword\": \"\",\n    \"Enabled\": true\n}\n```\n\n\u003e :exclamation: It is important to note that the names of your form fields might differ. Ensure that the `$formObject` hash table is appropriately adjusted to match your form fields. [See the Microsoft Docs page](https://learn.microsoft.com/en-us/powershell/module/activedirectory/new-aduser?view=windowsserver2022-ps)\n\n\n2. Imports the ActiveDirectory module.\n\n3. Verify if the user that must be created already exists based on the `userPrincipalName` using the `Get-ADUser` cmdlet.\n\n4. If the user does not exist, a new user is created using the `New-ADUser` cmdlet. The hash table called `$formObject` is passed to the `New-ADUser` cmdlet using the `@` symbol in front of the hash table name.\n\n\u003e :bulb: Splatting is a technique in PowerShell where you store the parameters and their values in a hash table, and then pass the hash table to a cmdlet or function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftools4everbv%2Fhelloid-task-sa-target-activedirectory-accountcreate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftools4everbv%2Fhelloid-task-sa-target-activedirectory-accountcreate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftools4everbv%2Fhelloid-task-sa-target-activedirectory-accountcreate/lists"}