I’m exporting my AAD users to CSV files, works fine with this code. $allUsers = Get-AzureADUser -All $true $users = $allUsers | Select-Object -Property ObjectId,ObjectType,UserPrincipalName,DisplayName,AccountEnabled,AgeGroup,City,CompanyName,ConsentProvidedForMinor,Country,CreationType,Department,DirSyncEnabled,FacsimileTelephoneNumber,GivenName,IsCompromised,ImmutableId,JobTitle,LastDirSyncTime,LegalAgeGroupClassification,Mail,MailNickName,Mobile,OnPremisesSecurityIdentifier,PasswordPolicies,PhysicalDeliveryOfficeName,PostalCode,PreferredLanguage,RefreshTokensValidFromDateTime,ShowInAddressList,State,StreetAddress,Surname,TelephoneNumber,UsageLocation,UserState,UserStateChangedOn,UserType,DeletionTimestamp,AssignedLicenses,AssignedPlans,ProvisionedPlans | ForEach-Object{ $_.DisplayName = $_.DisplayName -replace "\n", ‘ ‘ -replace ‘"’, ‘`’ $_ } $users | Export-Csv -Path $TempFileName -NoTypeInformation $provisionedPlans = $users = $allUsers | Select-Object -Property ObjectId,DisplayName,ProvisionedPlans But,… Read More Powershell Cascading Foreach to export to Csv