Created
October 7, 2015 21:54
-
-
Save jonathanelbailey/d3d38de4e9494eb6e7e3 to your computer and use it in GitHub Desktop.
A function that allows the configuration of Windows 10 32-bit OS for 16-bit application support
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
Function Set-SSSLegacyConsoleSettings{ | |
BEGIN{ | |
$checkwin10 = Gcim win32_operatingsystem | |
} | |
PROCESS{ | |
if ($checkwin10.Name -notmatch 'Windows 10'){ | |
Write-Host 'No update needed. Operating system must be Windows 10.' -ForegroundColor Green | |
} | |
else{ | |
if ((Get-WindowsOptionalFeature -Online -featurename ntvdm).state -ne 'enabled'){ | |
Enable-WindowsOptionalFeature -Online -FeatureName ntvdm | |
write-host 'NTVDM.exe has been installed.' -ForegroundColor Green | |
} | |
elseif((Get-WindowsOptionalFeature -Online -FeatureName ntvdm).state -eq 'enabled'){ | |
Write-Host 'NTVDM is already enabled.' -ForegroundColor DarkGreen | |
} | |
if((Get-ItemProperty -Path HKCU:\Console).forcev2 -eq 1){ | |
Set-ItemProperty -Path HKCU:\Console -Name forcev2 -Value 0 | |
} | |
elseif((Get-ItemProperty -Path HKCU:\Console).forcev2 -eq 0){ | |
Write-Host 'Legacy Console is already enabled.' -ForegroundColor DarkGreen | |
} | |
} | |
} | |
END{} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment