Skip to content

Instantly share code, notes, and snippets.

@Tcip
Created March 27, 2024 20:31
Show Gist options
  • Save Tcip/935057f390a62505bb0a106e04e28906 to your computer and use it in GitHub Desktop.
Save Tcip/935057f390a62505bb0a106e04e28906 to your computer and use it in GitHub Desktop.
echo Windows Edition using the PowerShell environment variable POWERSHELL_DISTRIBUTION_CHANNEL
@echo off
SET _we="%POWERSHELL_DISTRIBUTION_CHANNEL%"
FOR /F "tokens=* delims=MSI:" %%G IN (%_we%) DO echo %%G
pause
@Tcip
Copy link
Author

Tcip commented Mar 27, 2024

echo Windows Edition.bat

echo the name of the installed Windows Edition (Home, Pro, Education, Enterprise, etc) using the PowerShell environment variable POWERSHELL_DISTRIBUTION_CHANNEL. See also echo Windows Edition (variable version).bat.

echo Windows Edition bat

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