Cannot dot-source this command because it was defined in a different language mode

Problem:

PowerShell console runs in Constrained Language mode when using software restriction policies and AppLocker.  This means you may get an error when trying to run some scripts.

Continue reading “Cannot dot-source this command because it was defined in a different language mode”