Home Dashboard Directory Help
Search

Functions in Script Modules do not inherit variables from the scope of their caller by David Wyatt


Status: 

Active


7
0
Sign in
to vote
Type: Bug
ID: 828782
Opened: 3/5/2014 10:57:09 AM
Access Restriction: Public
0
Workaround(s)
view
3
User(s) can reproduce this bug

Description

When you call a function that's been imported from a psm1 Script Module, variables such as $ErrorActionPreference that have been set in the caller's local scope are not seen by the module's function, unless the calling code sets its variables in the Global scope.
Details
Sign in to post a comment.
Sign in to post a workaround.