My script needs to call third party scripts that do not work under strict mode. Right now I explicitly disable the strict mode in my script for these calls:
Set-StrictMode -Version 3
…my script here…
Set-StrictMode -Off
.\thirdparty.ps1
Set-StrictMode -Version 3
…the rest of my script here…
Given the strict mode is only set for the "current" and "child" scopes, and it is possible to, let say, create private variables not visible to child scopes, is there an option to also set the strict mode as private for the current scope? That would save me some effort trying to track the strict mode settings.