PowerShell If Statement

Hey there guys, my script is almost complete but I am stuck on this If Statement. if you guys can look over and let me know what I am doing wrong or what I am missing, that would be really helpful. Thank you for your help in advance 🙂

 ## Check For .Net Framework 4.5..1 $DotNetDirectory = "HKLM:SOFTWAREMicrosoftNET Framework SetupNDPv4Full" if (Test-Path $DotNetDirectory) { $version = Get-ItemPropertyValue $ndpDirectory -Name Release | ForEach-Object { $_ -ge 378675 } } Else { Show-InstallationPrompt -Title 'Installation Cannot Continue' -Message 'The System Must Have Microsoft .Net Framework 4.5.1 Installed' Exit-Script -ExitCode 10 } 

submitted by /u/TekJunki
[link] [comments]

Leave a Reply