diff --git a/Scripts/Powershell/Reporting/Inactive Computers.md b/Scripts/Powershell/Reporting/Inactive Computers.md new file mode 100644 index 0000000..97495af --- /dev/null +++ b/Scripts/Powershell/Reporting/Inactive Computers.md @@ -0,0 +1,5 @@ +``` powershell +$DaysInactive = 30 +$time = (Get-Date).Adddays(-($DaysInactive)) +Get-ADComputer -Filter {LastLogonTimeStamp -lt $time} -ResultPageSize 2000 -resultSetSize $null -Properties Name | Select Name +``` \ No newline at end of file