[TIMOB-16961] Fixed bug with code that checks if PowerShell is enabled.
Merge pull request #5700 from cb1kenobi/timob-16961

[TIMOB-16961] Fixed bug with code that checks if PowerShell is enabled.