Anka disable beta seed (#4564)

* Remove current beta seed program

* format unenroll output
This commit is contained in:
Aleksandr Chebotov
2021-11-22 15:18:46 +03:00
committed by GitHub
parent 04aeb7bfd4
commit 0365a15eb6
2 changed files with 15 additions and 0 deletions

View File

@@ -64,6 +64,10 @@ function Invoke-SoftwareUpdate {
$ipAddress = Get-AnkaVMIPAddress -VMName $TemplateName $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 # Install Software Updates
# Security updates may not be able to install(hang, freeze) when AutoLogon is turned off # Security updates may not be able to install(hang, freeze) when AutoLogon is turned off
Write-Host "`t[*] Finding available software" Write-Host "`t[*] Finding available software"

View File

@@ -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 { function Test-AutoLogon {
param( param(
[Parameter(Mandatory)] [Parameter(Mandatory)]