Skip to content

Commit 0365a15

Browse files
authored
Anka disable beta seed (#4564)
* Remove current beta seed program * format unenroll output
1 parent 04aeb7b commit 0365a15

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

images.CI/macos/anka/CreateCleanAnkaTemplate.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ function Invoke-SoftwareUpdate {
6464

6565
$ipAddress = Get-AnkaVMIPAddress -VMName $TemplateName
6666

67+
# Unenroll Seed
68+
Write-Host "`t[*] Reseting the seed before requesting stable versions"
69+
Remove-CurrentBetaSeed -HostName $ipAddress | Show-StringWithFormat
70+
6771
# Install Software Updates
6872
# Security updates may not be able to install(hang, freeze) when AutoLogon is turned off
6973
Write-Host "`t[*] Finding available software"

images.CI/macos/anka/Service.Helpers.psm1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,17 @@ function Show-StringWithFormat {
232232
}
233233
}
234234

235+
function Remove-CurrentBetaSeed {
236+
param(
237+
[Parameter(Mandatory)]
238+
[ValidateNotNullOrEmpty()]
239+
[string] $HostName
240+
)
241+
242+
$command = "sudo /System/Library/PrivateFrameworks/Seeding.framework/Versions/Current/Resources/seedutil unenroll"
243+
Invoke-SSHPassCommand -HostName $HostName -Command $command | Out-String
244+
}
245+
235246
function Test-AutoLogon {
236247
param(
237248
[Parameter(Mandatory)]

0 commit comments

Comments
 (0)