From 72d2566978dde5bf133f364cc12c7ba37208fbc4 Mon Sep 17 00:00:00 2001 From: Gabe Date: Tue, 5 Aug 2025 14:53:50 +0000 Subject: [PATCH] Upload files to "AD Scripts" --- .../Get AD last logon date for all computers and servers.ps1 | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 AD Scripts/Get AD last logon date for all computers and servers.ps1 diff --git a/AD Scripts/Get AD last logon date for all computers and servers.ps1 b/AD Scripts/Get AD last logon date for all computers and servers.ps1 new file mode 100644 index 0000000..d7e2f73 --- /dev/null +++ b/AD Scripts/Get AD last logon date for all computers and servers.ps1 @@ -0,0 +1,2 @@ +Get-ADComputer -Filter {OperatingSystem -Like '*SERVER*' } -Properties lastlogondate,operatingsystem |select name,lastlogondate,operatingsystem | Export-Csv C:\Temp\Script Cache\ServerLastLogon.csv +Get-ADComputer -Filter {OperatingSystem -notLike '*SERVER*' } -Properties lastlogondate,operatingsystem |select name,lastlogondate,operatingsystem | Export-Csv C:\Temp\Script Cache\ComputerLastLogon.csv \ No newline at end of file