Restructured Documentation
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 8s
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 8s
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
---
|
||||
tags:
|
||||
- PowerShell
|
||||
- Reporting
|
||||
- Scripting
|
||||
---
|
||||
|
||||
## Purpose
|
||||
This document records the procedure for inactive computers. Follow the environment assumptions and commands below.
|
||||
|
||||
```powershell
|
||||
$DaysInactive = 30
|
||||
$time = (Get-Date).Adddays(-($DaysInactive))
|
||||
Get-ADComputer -Filter {LastLogonTimeStamp -lt $time} -ResultPageSize 2000 -resultSetSize $null -Properties Name | Select Name
|
||||
```
|
||||
|
||||
## Related Documentation
|
||||
- [Related Identity and Certificates Documentation](<../../../../reference/Identity and Certificates/index.md>) — Find the connected deployments, procedures, and references for this subject.
|
||||
Reference in New Issue
Block a user