Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM) and Microsoft Intune use Detection Rules to determine the presence of Applications & Win32 Apps. The detection rules ensure that application installations only begin to run if the application is not already installed on the device. This article will serve as an informative guide and give you a clear understanding of how to confirm if a specific version of Microsoft .NET Framework is installed on a system using PowerShell detection scripts.
Check for Microsoft .NET Framework (Registry Detection Method)
Microsoft .NET Framework 4.8.1 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.8.1 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 533320) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.8.1 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.8 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.8 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 528040) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.8 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.7.2 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.7.2 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 461808) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.7.2 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.7.1 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.7.1 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 461308) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.7.1 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.7 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.7 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 460798) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.7 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.6.2 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.6.2 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 394802) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.6.2 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.6.1 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.6.1 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 394254) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.6.1 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.6 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.6 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 393295) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.6 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.5.2 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.5.2 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 379893) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.5.2 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.5.1 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.5.1 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 378675) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.5.1 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.5 (Registry Detection Method)
## Check for Microsoft .NET Framework 4.5 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Release -ge 378389) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.5 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.0 Full Profile (Registry Detection Method)
## Check for Microsoft .NET Framework 4.0 Full Profile (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue If ($Version.Install -eq 1) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.0 Full Profile Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 4.0 Client Profile (Registry Detection Method)
## Check for Microsoft .NET Framework 4.0 Client Profile (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client" -ErrorAction SilentlyContinue If ($Version.Install -eq 1) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 4.0 Client Profile Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 3.5 (Registry Detection Method)
## Check for Microsoft .NET Framework 3.5 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" -ErrorAction SilentlyContinue If ($Version.Install -eq 1) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 3.5 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 3.0 (Registry Detection Method)
## Check for Microsoft .NET Framework 3.0 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup" -ErrorAction SilentlyContinue If ($Version.InstallSuccess -eq 1) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 3.0 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 2.0 (Registry Detection Method)
## Check for Microsoft .NET Framework 2.0 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727" -ErrorAction SilentlyContinue If ($Version.Install -eq 1) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 2.0 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 1.1 (Registry Detection Method)
## Check for Microsoft .NET Framework 1.1 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322" -ErrorAction SilentlyContinue If ($Version.Install -eq 1) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 1.1 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Microsoft .NET Framework 1.0 (Registry Detection Method)
## Check for Microsoft .NET Framework 1.0 (Registry Detection Method) $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NETFramework\Policy\v1.0\3705" -ErrorAction SilentlyContinue If ($Version.Install -eq 1) { Write-Host "Installed" }
- Copy the Microsoft .NET Framework 1.0 Detection Method script content into the Custom Detection Rules (Script)
- Microsoft Endpoint Manager Configuration Manager (MEMCM / SCCM)
- Microsoft Intune
Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.