File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ function Invoke-SoftwareUpdate {
9090
9191 Write-Host " `t [*] Fetching Software Updates ready to install on '$TemplateName ' VM:"
9292 Show-StringWithFormat $newUpdates
93- $listOfNewUpdates = $ ($ ($newUpdates.Split (" *" )).Split(" Title" ) | Where-Object {$_ -match " Label:" }).Replace(" Label: " , ' ' )
93+ $listOfNewUpdates = $ ($ ($newUpdates.Split (" *" )).Split(" Title" ) | Where-Object {$_ -match " Label:" }).Replace(" Label: " , ' ' ) | Where-Object { $_ -notmatch " macOS Sonoma " }
9494 Write-Host " `t [*] Installing Software Updates on '$TemplateName ' VM:"
9595 Install-SoftwareUpdate - HostName $ipAddress - listOfUpdates $listOfNewUpdates - Password $Password | Show-StringWithFormat
9696
@@ -99,7 +99,7 @@ function Invoke-SoftwareUpdate {
9999 $listOfNewUpdates = $newUpdates.split (' *' ).Trim(' ' )
100100 foreach ($newupdate in $listOfNewUpdates ) {
101101 # Will be True if the value is not Venture, not empty, and contains "Action: restart" words
102- if ($newupdate.Contains (" Action: restart" ) -and ! $newupdate.Contains (" macOS Ventura" ) -and (-not [String ]::IsNullOrEmpty($newupdate ))) {
102+ if ($newupdate.Contains (" Action: restart" ) -and ( ! $newupdate.Contains (" macOS Ventura" ) -or ! $newupdate .Contains ( " macOS Sonoma " ) ) -and (-not [String ]::IsNullOrEmpty($newupdate ))) {
103103 Write-Host " `t [*] Sleep 60 seconds before the software updates have been installed"
104104 Start-Sleep - Seconds 60
105105
You can’t perform that action at this time.
0 commit comments