Use the following code snippet to get all of the users within your tenancy that are registered for first release (AKA Standard Release) and export the user list to a CSV file in the C:\ drive

Connect-MsolService -Credential $UserCredential

Get-MsolUser -MaxResults 2000 |Where-Object {$_.ReleaseTrack -like "StagedRolloutOne"}|select Displayname,UserPrincipalName|Ex
port-csv -Path C:\users.csv -NoTypeInformation

 

Possible error messages:

Connect-MsolService -Credential $UserCredential

Connect-MsolService : The term ‘Connect-MsolService’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Connect-MsolService -Credential $UserCredential
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Connect-MsolService:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

 

Check MSOnline module is installed

Get-Module -ListAvailable -Name MSOnline*

Make sure AzureAD for PowerShell is installed and imported:

Install-Module AzureAD -Force

Import-Module AzureAD