hello-for-bus.ps1

# THIS IS BEING CALLED IN THE PROVISIONING PACKAGE

# Define the registry path
$regPath = "HKLM:\SOFTWARE\Policies\Microsoft\PassportForWork"

# Create the registry path if it doesn't exist
if (-not (Test-Path -Path $regPath)) {
    Write-Host "Registry path $regPath does not exist. Creating it..."
    New-Item -Path $regPath -Force | Out-Null
    Write-Host "Registry path created successfully."
}

# Set the registry values
# This will create the properties if they don't exist or update them if they do
Set-ItemProperty -Path $regPath -Name "Enabled" -Value 1 -Type DWord -Force
Set-ItemProperty -Path $regPath -Name "DisablePostLogonProvisioning" -Value 1 -Type DWord -Force

Write-Host "Successfully configured PassportForWork settings:"
Write-Host "Enabled = 1"
Write-Host "DisablePostLogonProvisioning = 1"