Logon Hours Report Active Directory Users

by Robert Allen

In this guide, I’ll show you how to get user logon hours in Active Directory.

By default, Active Directory user accounts are allowed to logon at all hours. You can view or modify the logon hours by clicking the account tab and then clicking Logon Hours.

You will then get the window below that shows the user’s logon hours for all days of the week.

The problem is… Active Directory stores the user’s logon hours into a 21-byte array. This makes it difficult to read when trying to create a report for all users.

To display a users logon hours with PowerShell, use this command.

get-aduser -identity adam.hickey -properties LogonHours | select name, logonhours

But as you can see below PowerShell does not display the logon hours in an easy-to-read format.

That is not a very useful report. Below I’ll show you a logon hours report that is much easier to read and can quickly be generated for all domain users.

Easy to Read Logon Hours Report for All Users

Our Active Directory Reporting software now includes an easy to read logon hours report.

To run the report, click on Logon Reports > Logon Hours Report

You can run the report for all users or click “Browse” to select an OU.

See the example report below.

As you can see it converts the binary data into an easy to read format for each user.

You can export the report by clicking the export button and selecting CSV, Excel or PDF.

  • If a day says “Not Set” it means the default logon hours have not been changed. This means all hours are allowed.
  • If a day is blank, it means all logon hours are denied.
  • If a day list a time frame it means the user can logon only during that time.

Download a Free Trial of AD Pro Toolkit and try the logon hours report in your domain.

More User Reports

Recommended Tools

  • AD Cleanup Tool - Find stale and inactive user and computer accounts in Active Directory. Export, disable, move or delete the stale accounts to increase security.
  • AD User Creation Tool - Bulk import or update Active Directory user accounts. Add users to groups, import into OUs, set multiple attributes and more.
  • NTFS Permissions Tool - Scan and audit NTFS folder permissions. See which users and groups have access to what.
  • AD Reporting Tool - Over 200 reports on users, computers, groups, OUs and more. Customize reports or create your own reports with the report builder.

Leave a Comment