PowerShell Studio Product: PowerShell Studio 2019 (32 Bit)
Build: v5.6.163
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.16299.0
===================================================
Hi folks,
I'm a new PowerShell Studio user, but not a stranger to PowerShell scripts.
I have a function with an '$AzureAD = Connect-AzureAD' call that works and loads the required data to the form's objects, etc.
The problem is that (unlike the same GUI code in PowerShell_ISE) I can't create/pass the MFA session to 'New-ExoPSSession'.
1 - i'm prompted to login again... which doesn't happen when running the same commands in PowerShell_ISE, the session simply imports in the background.
2 - although prompted for credentials, the cmdlets work, but not recognized in the PowerShell Studio editor - wondering if that's why 1 above occurs...
I'm thinking it has something to do with scope or setting the session as some sort of global variable... but just can't seem to find what it is.
Thanks in advance for your help!
Marcel
New-ExoPSSession not being recognized as a cmdlet
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
-
- Posts: 2
- Last visit: Thu Feb 03, 2022 8:47 am
Re: New-ExoPSSession not being recognized as a cmdlet
You should not install 32 bit PSS on 64 bit OS. Remove it and install the 64 bit version.
There are numerous issues with Azure CmdLets when run in a form. Also MFA causes issues with authentication. There are methods used to persist a set of credentials. You may also have to use an account that duos not have MFA enabled.
There are numerous issues with Azure CmdLets when run in a form. Also MFA causes issues with authentication. There are methods used to persist a set of credentials. You may also have to use an account that duos not have MFA enabled.
Re: New-ExoPSSession not being recognized as a cmdlet
PowerShell Studio (32 bit) will still run 64 Bit scripts. You have to select 64 bit from the Ribbon->Home->Platform:
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
-
- Posts: 2
- Last visit: Thu Feb 03, 2022 8:47 am
Re: New-ExoPSSession not being recognized as a cmdlet
UPDATE:
Ends up the issue was the scope of the variables, i.e. needed to set the Azure session and relevant vars globally. MFA works fine, importing EXO session as well, etc.
Marcel
Ends up the issue was the scope of the variables, i.e. needed to set the Azure session and relevant vars globally. MFA works fine, importing EXO session as well, etc.
Marcel