Version .NET Framework

Inhaltsverzeichnis

Frage: Wie kann ich die .NET Framework Version der Geräte ermitteln?

Antwort:

Mit diesem Powershell-Skript kann die Version des .NET Framework aus der Registry des jeweiligen Gerätes ermittelt werden.

Hinweis: Bitte nur den Code zwischen den ‘<snip>’-Tags kopieren. Das Skript kann in der Skriptbibliothek der River als Job-Skript verwendet werden.

Skript-Code #

<snip>

$path = “HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full”
$regKey= “Release”

$releaseKey = (Get-ItemProperty $path -Name $regKey).$regKey

if ($releaseKey) {

if ($releaseKey -ge 528040) {

Write-Host “.NET Framework v4.8 or later”

}

elseif ($releaseKey -ge 461808) {

Write-Host “.NET Framework v4.7.2”

}

elseif ($releaseKey -ge 460798) {

Write-Host “.NET Framework v4.7”

}

elseif ($releaseKey -ge 394802) {

Write-Host “.NET Framework v4.6.2”

}

elseif ($releaseKey -ge 394254) {

Write-Host “.NET Framework v4.6.1”

}

elseif ($releaseKey -ge 393295) {

Write-Host “.NET Framework v4.6”

}

elseif ($releaseKey -ge 379893) {

Write-Host “.NET Framework v4.5.2”

}

elseif ($releaseKey -ge 378675) {

Write-Host “.NET Framework v4.5.1”

}

elseif ($releaseKey -ge 378389) {

Write-Host “.NET Framework v4.5”

}

else {

# This code should never execute. A non-null release key should mean
# that 4.5 or later is installed.

Write-Host “No .NET Framework v4.5 or later version detected”

}

}

exit 0

<snip>

Skript-Ausgabe #

Abb. 1

High Quality Theme

There is a fine line between creating greatness and accomplishing awesomeness. This time, we worked to prove that sky is not the limit.

Fill out the form to subscribe to our newsletter.

[contact-form-7 404 "Nicht gefunden"]

High Quality Theme

There is a fine line between creating greatness and accomplishing awesomeness. This time, we worked to prove that sky is not the limit.

Fill out the form to subscribe to our newsletter.

[contact-form-7 404 "Nicht gefunden"]