{"id":18653900,"url":"https://github.com/powershellcrack/offlinedomainjoin","last_synced_at":"2025-10-09T08:32:35.892Z","repository":{"id":111449950,"uuid":"349195013","full_name":"PowerShellCrack/OfflineDomainJoin","owner":"PowerShellCrack","description":"Script to join a device offline during task sequence","archived":false,"fork":false,"pushed_at":"2021-03-18T19:37:43.000Z","size":1204,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T08:32:01.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/PowerShellCrack.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.MD","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":"2021-03-18T19:31:43.000Z","updated_at":"2022-08-13T05:45:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"35487482-43b5-4ceb-a4a3-75fee59183e0","html_url":"https://github.com/PowerShellCrack/OfflineDomainJoin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PowerShellCrack/OfflineDomainJoin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FOfflineDomainJoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FOfflineDomainJoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FOfflineDomainJoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FOfflineDomainJoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PowerShellCrack","download_url":"https://codeload.github.com/PowerShellCrack/OfflineDomainJoin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerShellCrack%2FOfflineDomainJoin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001051,"owners_count":26082991,"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-10-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2024-11-07T07:13:28.204Z","updated_at":"2025-10-09T08:32:35.877Z","avatar_url":"https://github.com/PowerShellCrack.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Domain Join Script\n\n## Description\n\nThis domain join script was design to support offline domain join capability and post SCCM domain join.\n\n## Use cases\n\n- Task Sequence for both MDT/SCCM\n- Offline Domain Join (ODJ)\n- Pre Windows Join in PE (Unattend)\n- Post WinPE Join (Windows)\n\n\n### Offline Domain Join\n\nThis feature allows the script to use a offline domain join blob or File generated by a Domain Controller to join a system to the domain. This feature works in both WinPE during pre setup and Post setup. Presetup will apply the blob content to the Unattend file. The post setup will run the djoin command\n\n### Unattend\n\nThis feature is very similar to the way SCCM or MDT applies the domain join; it adds the domain details to the targeted Unattend.xml file. This feature works both Pre Windows setup (during WinPE) adn Windows Post setup, however it will initiate the sysprep command in post\n\n### Windows\n\nThis feature allows a device to join the domain using the Add-Computer cmdlet. This is the default feature and only works in Post WinPE...when Windows is running.\n\n## Examples\n\nJoin the domain using Task Sequence variables on while running in Windows\n```powershell\nDomainJoin.ps1\n```\n\nApply domain info to unattend file; typically done during pre windows. if done during Windows the sysprep parameter will be added\n```powershell\nDomainJoin.ps1 -JoinMethod Unattend -DomainJoinName contoso.com -Join contoso\\admin -JoinPassword P@$$w0rd12\n```\n\nJoin a device to the domain while logged into windows using credentials\n```powershell\nDomainJoin.ps1 -JoinMethod Windows -DomainJoinName contoso.com -Join contoso\\username -JoinPassword P@$$w0rd12 -Restart\n```\n\nJoin a device to the domain using a ODJ blob file from a network share uniquely identified by model and serial number\n```powershell\nDomainJoin.ps1 -JoinMethod ODJ -JoinODJBlobFile \\\\server01\\share01\\ODJ\\%model%_%serialnumber%.odj -Restart\n```\n\nJoin a device to the domain using a ODJ blob data\n```powershell\nDomainJoin.ps1 -JoinMethod Unattend -JoinODJBlob 'ARAIAMzMzMxIAwAAAAAAAAAA...'\n```\n\n## Variables\n\nThese variables are used during a Task Sequence and will preset the value for most parameters.\n\n- __OfflineDomainJoinBlob__ --\u003e this is custom variable; sets the value for _-JoinODJBlobFile_ parameter\n- __OfflineDomainJoinFile__ --\u003e this is custom variable; sets the value for _-JoinODJBlob_ parameter\n- __OSDComputerName__ --\u003e sets the _ComputerName_ variable; not a parameter\n- __\\_SMSTSMachineName__ --\u003e sets the _ComputerName_ variable if _OSDComputerName_ is not found; not a parameter\n- __OSDJoinDomainName__ --\u003e sets the value for _-JoinDomainName_ parameter\n- __OSDJoinAccount__ --\u003e sets the value for _-JoinUsername_ parameter\n- __OSDJoinPassword__ --\u003e sets the value for _-JoinPassword_ parameter\n- __OSDJoinDomainOUName__ --\u003e sets the value for _-JoinDomainOU_ parameter\n- __OSDisk__ --\u003e sets the _OSDisk_ variable; not a parameter\n\n## Exit Codes\n\n- __0__ --\u003e Successfully joined the domain; reboot may be required\n- __-1__ --\u003e Not all required parameters where provided\n- __-2__ --\u003e Domain Join failed. Check DomainJoin.log or enable debug and check c:\\Windows\\Logs\\JoinDomain.log\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowershellcrack%2Fofflinedomainjoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpowershellcrack%2Fofflinedomainjoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowershellcrack%2Fofflinedomainjoin/lists"}