Skip to content

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

License

Notifications You must be signed in to change notification settings

MingMZ/TestNetFxInstall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published