Running a task sequence from Intune
# If we are running as a 32-bit process on an x64 system, re-launch as a 64-bit process
if ("$env:PROCESSOR_ARCHITEW6432" -ne "ARM64") {
if (Test-Path "$($env:WINDIR)\SysNative\WindowsPowerShell\v1.0\powershell.exe") {
& "$($env:WINDIR)\SysNative\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy bypass -NoProfile -File "$PSCommandPath"
Exit $lastexitcode
}
}
# Run the specified task sequence
$DeployRBootstrap = @{ ProgressTimeout = "1" }
iex (irm "https://our-server-name.com:7281/v1/Service/Bootstrap?tsid=5d1e3201-36cb-433c-88b4-71c031f653fa:1")
# Creating tag file so that Intune can see that it is installed
Mkdir "$($env:ProgramData)\2Pint Software" -Force | Out-Null
Set-Content -Path "$($env:ProgramData)\2Pint Software\RunTS.ps1.tag" -Value "Installed"Last updated

