commit 130afb7baaa56d6bf2f07c1d71bbb0892e68f7b7 Author: Tommy Davis Date: Wed Feb 4 09:38:45 2026 -0600 first commit diff --git a/HJLaw.ppkg b/HJLaw.ppkg new file mode 100644 index 0000000..ade522f Binary files /dev/null and b/HJLaw.ppkg differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/hjinstall.ps1 b/hjinstall.ps1 new file mode 100644 index 0000000..6e02845 --- /dev/null +++ b/hjinstall.ps1 @@ -0,0 +1,35 @@ +function Join-HJLaw +{ + param( + [string]$DeviceName + ) + + if (-not $DeviceName -eq "") + { + Rename-Computer -NewName $DeviceName + } + $ppkg = $false + Get-ProvisioningPackage -AllInstalledPackages | ForEach-Object { + if($_.PackagePath -like "*HJLaw*") + { + if ($_.IsInstalled) + { + $ppkg = $true + } + } + } + if (-not $ppkg) + { + $registryPath = "HKLM:\SOFTWARE\Microsoft\Enrollments" + $subKeys = Get-ChildItem -Path $registryPath + foreach ($subKey in $subKeys) + { + Remove-Item -Path "$registryPath\$($subKey.PSChildName)" -Recurse -Force + } + dsregcmd /leave + Uninstall-ProvisioningPackage -AllInstalledPackages + + Install-ProvisioningPackage -PackagePath '.\HJLaw.ppkg' -QuietInstall -Force + dsregcmd /status + } +}