Open theuserbl opened 5 months ago
See the wiki section on custom segments.
In the configuration file, you can add a custom function like the following (fixed up in a one-liner):
function info_dotnet_version {
Return @{
Title = ".NET Version"
Content = [System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription.Split(' ')[-1]
}
}
and then reference it in the list:
@(
"dotnet_version"
# more fields...
)
which should then give you:
.NET Version: 8.0.7
...Or 4.8.4744, or whatever edition/CLR you're on.
WinFetch shows the PowerShell-Version as Shell. But is it possible, to add additional the .NET Version?
.NET 5.x have the version in $PSVersionTable under CLRVersion. And .NET Core and .NET 6.x+ can adding it to $PSVersionTable, if it is not a preview version, with $PSVersionTable.CLRVersion = [System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription -split '\s' | select -Last 1