System.Runtime.InteropServices.RuntimeEnvironment
class contains a set of static methods that provide information about the Common Language Runtime Environment. PS C:\> [Runtime.InteropServices.RuntimeEnvironment]::SystemConfigurationFile # Returns the location of the (system wide) machine.config file PS C:\> [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory() # Directory where the CLR is installed. PS C:\> [Runtime.InteropServices.RuntimeEnvironment]::GetSystemVersion() # Version number of CLR that is is running the current process.
FromGlobalaccessCache
tests whether a given assembly is loaded into the Global Assembly Cache, see this PowerShell script