Skip to content

Stephen Hackers Blog

Infrastructure & Cyber Security Technical Architect

  • Home
  • Stephen Hackers

Tag LastLogonDate

  • Home
  • Get a list of active users which have logged on to the domain in the last 7 days
13/08/2018

Get a list of active users which have logged on to the domain in the last 7 days

By Steve inMicrosoft, Microsoft Server 2016, Microsoft Windows 10, Microsoft Windows Server 2008, Microsoft Windows Server 2012, Powershell Tag Active Directory, Get-ADUser, Get-Date, LastLogonDate, PowerShell

# Get a list of users which have logged on to the domain in the last 7 days

$Date = (Get-Date).AddDays(-7)

Get-ADUser -Filter {LastLogonDate -gt $Date} | Select distinguishedName

 

Recent Posts

  • Azure Conditional Access Integration with Google Chrome
  • Block Downloads In MS TEAMS Thick Client For Non Managed Computers
  • Block Access From Unmanaged Devices To SharePoint or Specific Sites
  • How to Enable “Security Defaults” in Azure and Office 365
  • PowerCLI with a GUI – Clone a machine, add DHCP…
  • New Course & Exam Announcements in October
  • Exam PASSED – Managing Microsoft Teams MS700
  • VMware Horizon and Zero Clients Enabling Rapid…
  • VMware Horizon and Zero Clients Enabling Rapid Remote Secure IT Working
  • vSphere 7 with Kubernetes – Getting Started Guide
  • Security Is a Hugely Strategic Area For VMware:…
  • VMworld 2020 registration is now open!
  • Microsoft Azure Security – Study Notes
  • MS365 – Azure AD – Dynamic Groups and Expiration Settings
  • Office 365 Security and Compliance – Alert When A Specific File Is Accessed

Categories

VMware vExpert Security 2020

Microsoft Certified Azure Security Engineer Associate

VMware vExpert (5 years)

Certified Ethical Hacker

Microsoft Certified Azure Administrator Associate

VMware vExpert 2020

MCP 365 Mobility and Security

Symantec Certified Specialist

MCP 365 Identity and Services