Skip to content

GDPR consent problem: PowerShell 7.4.5 installer forcefully enables telemetry on upgrade even if previous version was installed with telemetry disabled #21467

Closed

Description

@R-Adrian

Prerequisites

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 here https://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_OPTOUT environment 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:
PowerShell 7.4.1 installation with telemetry disabled

checking before upgrade...
pwsh_741_before_upgrade

and running winget upgrade Microsoft.PowerShell (using the old Windows PowerShell instead of cmd.exe as a console window)

pwsh_742_winget_upgrade_

... PowerShell 7 telemetry optout is now disabled and the variable is not defined anymore - this means that telemetry was forcefully enabled during the upgrade.

pwsh_742_after_upgrade

Activity

  1. added
    Needs-Triage
    on Apr 13, 2024
  2. added
    WG-Engine
    on Apr 13, 2024
  3. changed the title [-]GDPR consent violation: PowerShell 7.4.2 installer forcefully enables telemetry on upgrade even if previous version was installed with telemetry disabled[/-] [+]GDPR consent problem: PowerShell 7.4.2 installer forcefully enables telemetry on upgrade even if previous version was installed with telemetry disabled[/+] on Apr 13, 2024
  4. StevenBucher98 commented on Apr 15, 2024

    @StevenBucher98
    Collaborator

    Additional context and information in this issue: https://github.com/microsoft/winget-pkgs/issues/

    GitHub
    The Microsoft community Windows Package Manager manifest repository - Issues · microsoft/winget-pkgs
  5. R-Adrian commented on May 16, 2024

    @R-Adrian
    Author

    note: that the issue opened for WinGet was closed today with the reason "This issue has been identified as requiring a fix from a third party or external repository. Since there has been no recent activity on this issue, it will be automatically closed."

    Since pull request #20420 has been merged but no release based on it is yet available i will keep this one open until that fix gets released via Windows Update.
    https://www.catalog.update.microsoft.com/Search.aspx?q=powershell+v7*

    and a side note: i think because of that enforced mandatory consent issue / bug, all PowerShell telemetry, both collected in the past and the future collected telemetry can be considered legally compromised unless there is a clearly defined $env:POWERSHELL_TELEMETRY_OPTOUT = 0 environment variable

    i.e. the simple absence of the optout environment variable can no longer be considered as informed consent, on the contrary it is highly suspect now because the user might have opted out when they installed PowerShell 7 but the version updates since then have wiped out that preference.

  6. R-Adrian commented on Jul 23, 2024

    @R-Adrian
    Author

    i see that v7.4.3 is now published via Windows Update.... (published on July 22nd, 2024) and that version contains the pull request that technically fixes the inheritance of settings from previous versions, including the telemetry optout/consent preference...

    https://www.catalog.update.microsoft.com/Search.aspx?q=powershell%20v7.4.3
    https://www.catalog.update.microsoft.com/ScopedViewInline.aspx?updateid=b1ee1069-f9aa-4f67-b637-b5d26239e0c7

    I think that the technical issue can be closed ... but it still remains as a LEGAL issue - because of that problem the legal basis for consent for every pwsh telemetry optout that is missing in Europe is now compromised and Microsoft could be considered in violation of the GDPR - multiple violations in fact, for each source instance of telemetry collected.

    I think that the proper fix for future versions would be to include additional messages / prompts for consent and these to be shown when $env:POWERSHELL_TELEMETRY_OPTOUT is not defined next time that pwsh is started in interactive mode (not for scripts though, that would mess scripting)... and if it is running with administrative rights then save the new consent / optout preference in a permanent environment variable.
    Maybe in the same $env:POWERSHELL_TELEMETRY_OPTOUT variable as now... assign the values 2 or 3 to it, to indicate the second version of the consent, explicit optin =2 or optout (=1 or 3)?

  7. removed
    Needs-Triage
    on Jul 23, 2024
  8. R-Adrian commented on Jul 24, 2024

    @R-Adrian
    Author

    re-opening the issue:
    i see that PowerShell version 7.4.4 was released yesterday https://github.com/PowerShell/PowerShell/releases/tag/v7.4.4
    and it seems to not not preserve anymore the initial installation settings from the previous versions (and also wipes the telemetry optout too) - it wants to install with telemetry enabled.

    i used the file:
    PowerShell-7.4.4-win-x64.msi SHA-256: c755a79759ad5daa5f76a855abb46be1b9ce86616607138fef5b02ec4bfae643

    1. i have uninstalled any pwsh v7 versions that i had... made sure the C:\Program Files\PowerShell was deleted and then...

    2. re-installed v7.4.3 with the MSI from GitHub, made sure to tick the checkbox for telemetry optout in the 7.4.3 installer,
      Verified that the $env:POWERSHELL_TELEMETRY_OPTOUT variable is present and defined when starting both pwsh and the classic Windows PowerShell
      ..also verified that the 7.4.4 MSI installer ignores again the telemetry optout when running before installing pwsh from MS Update Catalog (see details below)

    3. installed the same v7.4.3 downloaded from the Windows Update catalog
      File: powershell-7.4.3-win-x64_54091441f1ce659f9e6e493fca74c359265d819f.exe
      SHA-256: 168276b247543356bb689001041ee82e662c68fa9de74cb34c5392af98219343
      verified that the $env:POWERSHELL_TELEMETRY_OPTOUT variable is still present and defined after installing the v7.4.3 from MS Catalog on top of the 7.4.3 MSI downloaded from here on GitHub.
      (the installer from MS Update Catalog has preserved the setting but has created a duplicate add-remove programs entry - will open a separate issue for that)

    4. ... and when i start the 7.4.4 installer to upgrade, it ignores the telemetry optout preference already defined by the 7.4.3 MSI installer and wants to forcefully enable telemetry again.

    image

    i let the installer run, and when it finished... as expected, the telemetry optout preference was wiped again...

    image

    GitHub
    7.4.4 - 2024-07-18 Engine Updates and Fixes

    Resolve paths correctly when importing files or files referenced in the module manifest (Internal 31780)

    Build and Packaging Improvements

    Bump .NET t...

  9. changed the title [-]GDPR consent problem: PowerShell 7.4.2 installer forcefully enables telemetry on upgrade even if previous version was installed with telemetry disabled[/-] [+]GDPR consent problem: PowerShell 7.4.4 installer forcefully enables telemetry on upgrade even if previous version was installed with telemetry disabled[/+] on Jul 24, 2024
  10. StevenBucher98 commented on Aug 1, 2024

    @StevenBucher98
    Collaborator

    Sharing here that I confirmed this seems to be only reproducable via winget, other non-interactive ways like using msiexec to upgrade respects the properties set.

  11. denelon commented on Aug 1, 2024

    @denelon

    Steven Bucher (@StevenBucher98) I'd be more than happy to collaborate to figure out what we can do here. Maybe there is a switch we can pass to the installer or something else to address this issue.

  12. R-Adrian commented on Aug 22, 2024

    @R-Adrian
    Author

    just noticed that pwsh 7.4.5 is now available and it supposedly now preserves the installation options from the previous version...

    #24143

    unfortunately that is still not the case, i just upgraded from 7.4.4 to 7.4.5 via winget and the 7.4.5 installer forcefully enabled telemetry yet again, by wiping the environment optout variable.

    screenshot before installation:
    image

    i closed pwsh v7.4.4 and ran the winget upgrade... then...
    image

    q.e.d. the telemetry optout was wiped again by the v7.4.5 installer,

  13. changed the title [-]GDPR consent problem: PowerShell 7.4.4 installer forcefully enables telemetry on upgrade even if previous version was installed with telemetry disabled[/-] [+]GDPR consent problem: PowerShell 7.4.5 installer forcefully enables telemetry on upgrade even if previous version was installed with telemetry disabled[/+] on Aug 22, 2024
  14. R-Adrian commented on Oct 25, 2024

    @R-Adrian
    Author

    winget started showing today that pwsh version 7.4.6 is available as upgrade from 7.4.5

    before upgrade:

    > $env:POWERSHELL_TELEMETRY_OPTOUT
    1
    >
    

    after upgrade (and a full system reboot just to make sure), the environment optout is preserved:

    > $env:POWERSHELL_TELEMETRY_OPTOUT
    1
    >
    

    so i think i can finally mark this issue as closed/fixed.

  15. microsoft-github-policy-service commented on Oct 25, 2024

    @microsoft-github-policy-service
    Contributor

    📣 Hey Adrian (@R-Adrian), how did we do? We would love to hear your feedback with the link below! 🗣️

    🔗 https://aka.ms/PSRepoFeedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

WG-Engine

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions