Get-PnPAzureADUser : Code: Request_UnsupportedQuery

I have this weird behavior inside my PnP Power Shell:- now if i write this Power Shell i will get results:- Get-PnPAzureADUser -Filter {AccountEnabled eq true and Mail eq ‘test@test.com’} but if i define the Mail inside a variable i will get this error:- PS C:\windows\system32> $rrr = "test@test.com" PS C:\windows\system32> Get-PnPAzureADUser -Filter {AccountEnabled eq… Read More Get-PnPAzureADUser : Code: Request_UnsupportedQuery

""Missing argument in parameter list."" when trying to define a list of Site IDs

I have the following as part of a Power-Shell script:= Connect-ExchangeOnline $SiteIDs = (64898c8f-2d5f-4e0e-9a9b-eb9828975a9e,20e6140c-0441-4988-b36c-c61cf3400847) where i am trying to define a list of site IDs, but the above is returning this error:- PS C:\WINDOWS\system32> $SiteIDs = (64898c8f-2d5f-4e0e-9a9b-eb9828975a9e,20e6140c-0441-4988-b36c-c61cf3400847) At line:1 char:49 + $SiteIDs = (64898c8f-2d5f-4e0e-9a9b-eb9828975a9e,20e6140c-0441-4988-b … + ~ Missing argument in parameter list. + CategoryInfo :… Read More ""Missing argument in parameter list."" when trying to define a list of Site IDs

error to change user ad from OU to powershell

I’m creating a script to change certain OU users, but it gives a parameter error and it’s not working. Users and OUs are being listed through an .csv file, the strings get the information, but when putting it in the code line it doesn’t work. Import-Csv -Path C:\Users\leonan.martins\Desktop\teste1.csv -Delimiter ‘,’ -PipelineVariable User | ForEach-Object -Process… Read More error to change user ad from OU to powershell

The term 'Get-AzureSubscription' is not recognized as a name of a cmdlet, function, script file, or executable program

I installed Az Module with the following command, but I still get the following error. Install-Module -Name Az -AllowClobber -Scope AllUsers Get-AzureSubscription: The term ‘Get-AzureSubscription’ is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the… Read More The term 'Get-AzureSubscription' is not recognized as a name of a cmdlet, function, script file, or executable program

Powershell Cascading Foreach to export to Csv

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