on-internet
← Community

Can a powershell module call functions in its importer's scope?

Stack Overflow ·

Is it possible for a powershell module to call functions that live in its importer's scope? For example, say I have module.psm1, and script.ps1. Inside script.ps1 I import module.psm1, and define a function called Execute-Payload. Is there any way for the code in module.psm1 to call Execute-Payload?

Comments

Sign in or sign up to comment and upvote.

No comments yet.