The PowerShell ecosystem is more diverse than it used to be which makes determining the PowerShell host a bit more difficult.
The variable $host, and its Name property, is a good starting point.
PS> $host.Name
ConsoleHost
You get ConSoleHost… Read the full text.