Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Get-Content -Path "c:\users\tyler.hampton\desktop\Computers.txt" | ForEach-OBject {
- Get-ADComputer -Filter {Name -like$_} -Properties * | Sort LastLogonDate | FT Name, LastLogonDate, LastLogonUser, Location -Autosize | Add-Content C:\users\tyler.hampton\desktop\ComputerLastLogonDate.txt
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement