My coworker and myself I am facing a really odd issue with PowerShell ISE: The following code simply returns $null
when executed via PowerShell ISE, but works fine in a regular PowerShell window or in VS Code:
Import-Module AzureAd
Connect-AzureAD
$user = Get-AzureADUser -SearchString "fooar@test.com"
The connection is correctly established because calling Get-AzureADUser -All $true
returns the expected set of users in ISE.
We are using version 2.0.0.155
of module AzureAD
. And this is the used PowerShell version:
Major Minor Build Revision
----- ----- ----- --------
5 1 16299 248
Any idea why it is not working in ISE?