diff --git a/images.CI/macos/anka/CreateCleanAnkaTemplate.ps1 b/images.CI/macos/anka/CreateCleanAnkaTemplate.ps1 index 28448e254..ff38c1b6f 100644 --- a/images.CI/macos/anka/CreateCleanAnkaTemplate.ps1 +++ b/images.CI/macos/anka/CreateCleanAnkaTemplate.ps1 @@ -64,6 +64,10 @@ function Invoke-SoftwareUpdate { $ipAddress = Get-AnkaVMIPAddress -VMName $TemplateName + # Unenroll Seed + Write-Host "`t[*] Reseting the seed before requesting stable versions" + Remove-CurrentBetaSeed -HostName $ipAddress | Show-StringWithFormat + # Install Software Updates # Security updates may not be able to install(hang, freeze) when AutoLogon is turned off Write-Host "`t[*] Finding available software" diff --git a/images.CI/macos/anka/Service.Helpers.psm1 b/images.CI/macos/anka/Service.Helpers.psm1 index fce822d67..2c5ba9bdd 100644 --- a/images.CI/macos/anka/Service.Helpers.psm1 +++ b/images.CI/macos/anka/Service.Helpers.psm1 @@ -232,6 +232,17 @@ function Show-StringWithFormat { } } +function Remove-CurrentBetaSeed { + param( + [Parameter(Mandatory)] + [ValidateNotNullOrEmpty()] + [string] $HostName + ) + + $command = "sudo /System/Library/PrivateFrameworks/Seeding.framework/Versions/Current/Resources/seedutil unenroll" + Invoke-SSHPassCommand -HostName $HostName -Command $command | Out-String +} + function Test-AutoLogon { param( [Parameter(Mandatory)]