#Domain Join Write-Host "Joining Arrow domain..." -ForegroundColor Yellow $Domain = 'arrow.local' $Credential = Get-Credential Add-Computer -DomainName $Domain ` -OUPath 'OU=Haydock,OU=Arrow-EndPoints,DC=arrow,DC=local' ` -Credential $Credential -Force Write-Host "Device joined - See Haydock OU." -ForegroundColor Green #Install RMM Agent Write-Host "Installing the RMM Agent..." -ForegroundColor Yellow (New-Object System.Net.WebClient).DownloadFile("https://merlot.centrastage.net/csm/profile/downloadAgent/513d13b1-2a61-460f-8f2a-730c64acb7c4", "$env:TEMP/AgentInstall.exe");start-process "$env:TEMP/AgentInstall.exe" Write-Host "RMM Agent installation complete." -ForegroundColor Green #Install Invgate Agent Write-Host "Installing the Invgate Insight Agent..." -ForegroundColor Yellow $msiUrl = "https://www.invgate.tech/media/updates/insight-agent-windows-3_41_0.msi" $msiPath = "$env:TEMP\insight-agent-windows-3_41_0.msi" Invoke-WebRequest -Uri $msiUrl -OutFile $msiPath Start-Process "msiexec.exe" -ArgumentList "/i `"$msiPath`" PROTOCOL='httpss' IP='aro.is.cloud.invgate.net' PORT='443' SECRET_KEY='03c1155565477588' /qn" -Wait Write-Host "Invgate Agent installation complete." -ForegroundColor Green # Run gpupdate Write-Host "Updating Group Policy..." -ForegroundColor Yellow gpupdate Write-Host "Policy updated" -ForegroundColor Green #Run Dell Command Updates Write-Host "Checking for Dell driver and firmware updates..." -ForegroundColor Yellow Set-Location "C:\Program Files (x86)\Dell\CommandUpdate" .\dcu-cli.exe /scan .\dcu-cli.exe /applyupdates Write-Host "Dell updates complete." -ForegroundColor Green #Install Windows Updates Write-Host "Installing Windows Updates (this may take a while)..." -ForegroundColor Yellow Install-WindowsUpdate -AcceptAll -AutoReboot Write-Host "Windows Updates complete." -ForegroundColor Green #Remove scripts Write-Host "Cleaning up OSDCloud data and build scripts..." -ForegroundColor Yellow Remove-Item -Path "C:\Join.ps1" -Force Remove-Item -Path "C:\Build.ps1" -Force Remove-Item -Path C:\OSDCloud -Recurse -Force Write-Host "Scripts Removed" -ForegroundColor Yellow #Reboot Write-Host "Rebooting...." start-sleep 30 Restart-Computer