You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Windows the call of powershell should be including the argument -NoProfile to avoid loading stuff a user wants in their interactive session. Perhaps also a good idea is to also include the argument -NonInteractive so the session would fail rather than waiting forever for a possible user input. Of course that's highly unlikely for a simple call of gwmi but it sure would not hurt.