-
Notifications
You must be signed in to change notification settings - Fork 54
msonline module - where statements not working #644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello @Shadoxity -- Thank you for reporting this issue. Are you importing the module using the |
Yes, definitely. I am wondering if its something to do with "deserialized" objects. as it says this when importing the module. and some more digging I have found the licenses property returns. "Microsoft.Online.Administration.UserLicense" ], Instead of the actual license names :S |
Thanks for the reply @Shadoxity. There is another potential workaround you can try which uses the Windows PowerShell version in the worker (this is the VM where your function code is executed). The workaround is described here: #232 (comment). Here is a full example: https://github.com/eamonoreilly/ManageAzureActiveDirectoryWithPowerShellFunction/blob/master/ManageAzureAD/run.ps1 |
Great idea, and it seems to work! Just need to work out getting the right output from it! |
Great to hear the workaround is working. I will follow-up with the PowerShell Team on the serialization issue. Thanks. |
Hey Team,
I am trying to get a script working but any time I pipe a "where" or "Where-object" into it, I get zero results.
i.e.$_.licenses).AccountSkuId -ilike "*$ ($licenseName)"} | Sort-Object DisplayName
$UserNames = Get-MsolUser -TenantId $tenantid -ALL | Where {(
If i run the same script locally it works perfectly fine, but just does not work in functions.
If i remove the Where statement it runs fine.
Please help
The text was updated successfully, but these errors were encountered: