Created
March 27, 2024 21:42
-
-
Save Tcip/9401dcf8a93a61446de6b78e36cd86f2 to your computer and use it in GitHub Desktop.
echo Windows Edition using the PowerShell environment variable POWERSHELL_DISTRIBUTION_CHANNEL. This version store the data in a variable and then call it with echo command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET _we="%POWERSHELL_DISTRIBUTION_CHANNEL%" | |
FOR /F "tokens=* delims=MSI:" %%G IN (%_we%) DO SET _newvar=%%G | |
echo. %_newvar% | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
echo Windows Edition (variable version).bat
echo the name of the installed Windows Edition (Home, Pro, Education, Enterprise, etc) using the PowerShell environment variable POWERSHELL_DISTRIBUTION_CHANNEL. This version store the data in a variable and then call it with echo command. None variable version can be found here.
Screenshot from echo Windows Edition.bat. The output is the same.