Skip to content

Commit

Permalink
Remove logic that removes Microsoft.Copilot package before sysprep. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lpleahy authored Oct 17, 2024
1 parent cee2f33 commit 39dc55d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions packaging/googet/google-compute-engine-sysprep.goospec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"path": "sysprep/sysprep_uninstall.ps1"
},
"releaseNotes": [
"3.23.0 - Remove logic that removes Microsoft.Copilot package before sysprep.",
"3.22.0 - Remove Microsoft.Copilot package before sysprep.",
"3.21.0 - Updating activate_instance.ps1.",
"3.20.0 - Remove MTLS MDS certificates from certificate store and disk during sysprep.",
Expand Down
14 changes: 0 additions & 14 deletions sysprep/sysprep.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,6 @@ function Clear-TempFolders {
}
}

function Clear-Packages {
<#
.SYNOPSIS
Remove all unwanted packages.
.DESCRIPTION
This function defines an array which contains all packages that need to be removed.
We use Get-AppxPackage with Remove-AppxPackage to remove each package in the array.
#>
@("Microsoft.Copilot*") | ForEach-Object {
Get-AppxPackage $_ | Remove-AppxPackage -ErrorAction Ignore
}
}

function Test-Admin {
<#
.SYNOPSIS
Expand Down Expand Up @@ -214,7 +201,6 @@ try {
Invoke-ExternalCommand schtasks /change /tn GCEStartup /disable -ErrorAction SilentlyContinue

# Do some clean up.
Clear-Packages
Clear-TempFolders
Clear-EventLogs

Expand Down

0 comments on commit 39dc55d

Please sign in to comment.