Script Download:
The script is available for download from https://gallery.technet.microsoft.com/How-to-determine-versions-d3669799.
The sample code demonstrates how to determine versions and service pack levels of .NET Framework.
You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery