MingMZ / TestNetFxInstall

Powershell script to test versions of .net framework are installed through registry checks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TestNetFxInstall Readme

TestNetFxInstall is a powershell module to detect .net framework installation by checking windows registry values, and it support detecting .net framework version from 1.0 to 4.7. It is inspired by this MSDN Blog Post.

How to use TestNetFxInstall

Clone TestNetFxInstall repository to

git clone https://github.com/MingMZ/TestNetFxInstall.git %UserProfile%\Documents\WindowsPowerShell\Modules\TestNetFxInstall

Then from the powershell prompt, type

Import-Module TestNetFxInstall

Cmdlets

Once TestNetFxInstall module is imported into powershell, these additional cmdlets will be available to you current powershell session:

  • Test-NetFx10Install
  • Test-NetFx11Install
  • Test-NetFx20Install
  • Test-NetFx30Install
  • Test-NetFx35Install
  • Test-NetFx40ClientInstall
  • Test-NetFx40FullInstall
  • Test-NetFx45Install
  • Test-NetFx451Install
  • Test-NetFx452Install
  • Test-NetFx46Install
  • Test-NetFx461Install
  • Test-NetFx462Install
  • Test-NetFx47Install
  • Get-NetFxInstalled

Examples

To check if .net framework 3.5 is installed

if (Test-NetFx35Install) { Write-Output ".Net 3.5 is installed" }
else { Write-Output ".Net 3.5 is not installed" }

To list all .net frameworks installed

Get-NetFxInstalled

Acknowledgement

Thanks Aaron Stebner for providing .net framework installation registry information.

About

Powershell script to test versions of .net framework are installed through registry checks

License:MIT License


Languages

Language:PowerShell 100.0%