Skip to content

Commit

Permalink
Update sos-optimize-windows.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
simeononsecurity authored Jul 22, 2024
1 parent ac8c672 commit b32a4be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sos-optimize-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1230,14 +1230,15 @@ if ($removebloatware -eq $true) {
Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\WindowsCopilot" -Name "TurnOffWindowsCopilot" -Type DWord -Value 1

# Hide the Copilot button and disable its functionality for the current user
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Force | Out-Null
#New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Force | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowCopilotButton" -Type DWord -Value 0

# Output a confirmation message
Write-Output "The Copilot button has been disabled and hidden from the taskbar."

# Uninstall the Copilot application
Get-AppxPackage *Windows.Copilot* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Copilot* | Remove-AppxPackage

# Output a confirmation message
Write-Output "The Copilot application has been uninstalled."
Expand Down

0 comments on commit b32a4be

Please sign in to comment.