About Me

My photo
Bergen, Norway
19th times Microsoft MVP (Security and Windows). IT-Dude @SpareBankenNorge

Saturday, September 26, 2020

PowerShell script to get some AzureAD logins stats

 The information you get in the Azure portal about logins are decent, but some time you need some statistic or insight fast and don't want to use the graphic interface or down load csv/json files.

I have created som script and favourite lines and uploaded it to my Github repo

There is a menu based script to quick get some stats about successful and unsuccessful logins, apps used and login locations called Get-Last7DaysLogin.ps1

Check-UserLogins.ps1 - will based on first name of user (or start of first) search for all users with that name and give you the time of last unsuccessful login of those users

Check-LastUnsuccessfullLogin.ps1 - will based on first name of user (or start of first) search for all users with that name and give you the time of last unsuccessful login of those users
The CollectionOfQuickCommands.ps1 are as the name indicate, just some parameters I use with the Get-AzureADAuditSignInLogs command. Filtering on successful, unsuccessful and dates.
You will find everything HERE

  




Cleaning Up Unknown IAM Assignments Across Azure Subscriptions

  If you manage more than a handful of Azure subscriptions, IAM hygiene quickly becomes one of those tasks everyone knows is important, but ...