reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" /v Release Check installation folder:
Check via command line:
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' | Get-ItemPropertyValue -Name Release Expected value for 4.7.2: (or higher if updates applied).
$installer = "C:\deploy\NDP472-KB4054530-x86-x64-AllOS-ENU.exe" $arguments = "/q /norestart /ChainingPackage FullX64" $process = Start-Process -FilePath $installer -ArgumentList $arguments -Wait -PassThru if ($process.ExitCode -eq 0 -or $process.ExitCode -eq 3010) Write-Host "Success" if ($process.ExitCode -eq 3010) Restart-Computer -Force