How to call InvocationInfo.PSScriptRoot for a PowerShell Module?

hayfever76

New member
Joined
Sep 5, 2023
Messages
1
Programming Experience
3-5
I am teaching myself C# by building a PowerShell module. I want to retrieve the PSScriptRoot property from the InvocationInfo class but it appears to be something that is called indirectly. Does anyone have guidance on a) how to invoke it or b) how to use it to spit out the script root?
 
Back
Top Bottom