Reputation: 79
How can I tell if whether my PowerShell module function was called by my .NET / C# application (production) or from the command line (unit testing)? I'm running PowerShell v5, .NET 4.5.x .
Thanks!
Upvotes: 1
Views: 32
Reputation: 79
$Host.Name
shows me the name of the host application and allows me to distinguish between prod and test.
Upvotes: 1