-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
- if an existing version of PowerShell 7 is installed then uninstall it from control panel.
- make sure there is no C:\Program Files\PowerShell\7 folder left
- download and install the immediately previous version
(e.g. 7.4.1 in our case herehttps://github.com/PowerShell/PowerShell/releases/download/v7.4.1/PowerShell-7.4.1-win-x64.msi) - install that version. When installing make sure to enable the checkbox for opt out, to disable telemetry.
- start pwsh, check the output of the
$env:POWERSHELL_TELEMETRY_OPTOUTenvironment variable
(it shows 1 in my case)
for testing silent / unattended upgrade - make sure pwsh 7 is not running, start an elevated cmd.exe command prompt, run winget upgrade Microsoft.PowerShell - and update pwsh to version 7.4.2 ( https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/PowerShell-7.4.2-win-x64.msi )
for testing interactive upgrade: run the MSI installer manually - the same result can be observed - the telemetry preference is reset to defaut (i.e. the checkbox is disabled in the MSI installer running an upgrade).
- after the upgrade start pwsh and check the output of that environment variable again - after the winget silent/unattended update it shows no optout (i.e. the telemetry is now forcefully enabled again)
Expected behavior
telemetry remains disabled
Actual behavior
telemetry is forcefully enabled for either interactive updates (the opt out preference is not used by the MSI installer) or silent / unattended updates
Error details
installer issue
Environment data
(MSI installer issue - env not really relevant)
Visuals
PowerShell telemetry reference:
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_telemetry?view=powershell-7.4
PowerShell 7.4.1 manual installation of the MSI file, with telemetry disabled:

and running winget upgrade Microsoft.PowerShell (using the old Windows PowerShell instead of cmd.exe as a console window)
... PowerShell 7 telemetry optout is now disabled and the variable is not defined anymore - this means that telemetry was forcefully enabled during the upgrade.


