Fixed Formatting of Files
All checks were successful
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 5s

This commit is contained in:
2026-02-27 04:09:43 -07:00
parent 554c04aa32
commit 51cdd1fdb6
155 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
---
tags:
- PowerShell
- Reporting
- Scripting
---
``` powershell
InactiveDays = 30
$Days = (Get-Date).Adddays(-($InactiveDays))
Get-ADUser -Filter {LastLogonTimeStamp -lt $Days -and enabled -eq $true} -Properties LastLogonTimeStamp |
select-object Name,@{Name="Date"; Expression={[DateTime]::FromFileTime($_.lastLogonTimestamp).ToString('MM-dd-yyyy')}}
```