Write-Host -ForegroundColor Cyan "Starting OSDCloud ZTI" Start-Sleep -Seconds 5 #Change Display Resolution for Virtual Machine if ((Get-MyComputerModel) -match 'Virtual') { Write-Host -ForegroundColor Green "Setting Display Resolution to 1600x" Set-DisRes 1600 } if ((Get-MyComputerModel) -like 'HP EliteBook X G1i*') { Write-Host -ForegroundColor Green "Starting automatically the script HP EliteBook X G1i model with Windows 11 profile" $token = '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' $repoOwner = 'ComplianceAG' $repoName = 'OSDCloud' $branch = 'main' $filePath = 'Profiles/Windows11.ps1' # GitHub Raw URL $rawUrl = "https://raw.githubusercontent.com/$repoOwner/$repoName/$branch/$filePath" # Prepare headers for authentication $headers = @{ Authorization = "token $token" Accept = 'application/vnd.github.v3.raw' 'User-Agent' = "$repoOwner" } # Download the script content $scriptContent = Invoke-RestMethod -Uri $rawUrl -Headers $headers # Option 1: Execute directly from memory (no file) Invoke-Expression $scriptContent } else { Write-Host -ForegroundColor Green "Start OSDPad" Start-OSDPad -RepoOwner ComplianceAG -RepoName OSDCloud -RepoFolder Profiles -BrandingTitle 'MME OS Deployment' -OAuth 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 -Hide Script #Start-OSDPad -RepoOwner ComplianceAG -RepoName OSDCloud -RepoFolder Profiles -BrandingTitle 'MME OS Deployment' -OAuth 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 }