Powershell: how does calling a .NET method work?

Hinterleitner Andreas 0 Reputation points

When I make a call to .NET in, let's say, PowerShell 7.4.3, such as:

$HT = [System.Collections.Hashtable]::new()

am I right when I say that PowerShell uses the .NET version on which it is based, in my example 8.0.6?

Microsoft Technologies based on the .NET software framework.
3,596 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,287 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 45,671 Reputation points

    Yes. But you lose the behaviors added by PowerShell.

    0 comments No comments

  2. Hinterleitner Andreas 0 Reputation points

    Thank you for your answers.

    0 comments No comments