I understand there is a relationship between PowerShell and .NET, but I can't locate the details via Google. I was able to setup a fresh Linux instance that didn't have PowerShell or .NET, and then only installed PowerShell. PS cmdlets worked normally. When I looked at the .NET runtimes, none were listed.
Questions:
- What is the relationship/mapping between PowerShell and .NET?
- Is there a document that shows the mapping?
- Is you have more than one .NET runtime installed which one is used by PowerShell?
====================================
UPDATE
I created a follow-up question based on the answer below: PowerShell 7.0 / 7.1 and .NET runtimes
Windows PowerShell System Requirements
https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/install/windows-powershell-system-requirements?view=powershell-7
Common Language Runtime 4.0
Windows PowerShell 3.0, Windows PowerShell 4.0, and Windows PowerShell 5.0 are compiled against Common Language Runtime (CLR) 4.0.
Windows PowerShell engine requirements
The Windows PowerShell 2.0 engine's minimum requirement is Microsoft .NET Framework 2.0.50727. This requirement is fulfilled by Microsoft .NET Framework 3.5 Service Pack 1.
Nearly everything will use CLR 4.0, unless a module manifest specifies CLR 2 or you start PowerShell with the -Version 2.0 switch.
https://stackoverflow.com/questions/63520845/determine-net-and-clr-requirements-for-your-powershell-modules
https://docs.microsoft.com/en-us/powershell/scripting/developer/module/how-to-write-a-powershell-module-manifest