I have an imported module that I am using in another PowerShell script. For this specific script, I need one small change made to a variable within this imported module. Is there a way to import a module, and then override a specific item/variable with a new value, within the script? For example below:
function testmodule{
$test1 = "this is a test"
$test2 = "this is a second test"
echo $test1, $test2
}
Lets say i'm importing the above as a module into a script. How would I override $test2 is a new script without editing the module? I was thinking of something like testmodule.$test2 = "this is the override"
And the output in the script that imports the module would be "this is a test" "this is the override"