Search notes:

System.Runtime.InteropServices.RuntimeInformation (class)

System.Runtime.InteropServices.RuntimeInformation provides information aobut the .NET runtime installation.

FrameworkDescription

The FrameworkDescription property return the name of the .NET installation on which an app is running, thus the following PowerShell command returns the .NET framework version on which the current PowerShell was built on:
PS C:\> [System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription
.NET 9.0.1
As per this Stackoverflow answer, the previous command does not work with PSReadLine version 2.0.
Compare with

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/Microsof...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1759390572, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/dot-net/namespaces-classes/System/Runtime/InteropServices/RuntimeInformation(46): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51