2 thoughts on “PowerShell: Getting all Azure AD User IDs Last Login date and Time”

  1. $Users = Get-MsolUser -all
    $Headers = “DisplayName`tUserPrincipalName`tLicense`tLastLogon” >>C:\Temp\Users.txt

    The >> is not recognized in PowerShell is this the right command.

    1. Hi Linda
      Yes Powershell supports this. > redirects output to the file specified >> appends to the file. There are other ways of doing this, but this one is simple. It will automatically create the file if it doesn’t already exist.

Leave a Reply

Your email address will not be published. Required fields are marked *