PowerShell Quickie: Deleting unused computers from AD
In this PowerShell Quickie we're cleanin up our Active Directory by deleting computers that haven't been used for a while.
Script:
$LastLogonDate = (Get-Date).Adddays(-(90))
Get-ADComputer -Filter {LastLogonTimeStamp -le $LastUsedDate} -Properties LastLogonTimeStamp | Remove-ADComputer -Confirm:$false
PowerShell Quickie Playlist: https://www.youtube.com/playlist?list=PLfYIS7PWFoq6WiAjpA_fG3ooUlD40MZgk
Facebook: https://www.facebook.com/TechNutYouTube
Видео PowerShell Quickie: Deleting unused computers from AD канала TechNut
Script:
$LastLogonDate = (Get-Date).Adddays(-(90))
Get-ADComputer -Filter {LastLogonTimeStamp -le $LastUsedDate} -Properties LastLogonTimeStamp | Remove-ADComputer -Confirm:$false
PowerShell Quickie Playlist: https://www.youtube.com/playlist?list=PLfYIS7PWFoq6WiAjpA_fG3ooUlD40MZgk
Facebook: https://www.facebook.com/TechNutYouTube
Видео PowerShell Quickie: Deleting unused computers from AD канала TechNut
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![6. Active Directory Maintenance: Finding Stale Computer Objects w/ PowerShell](https://i.ytimg.com/vi/57NCLRacVRk/default.jpg)
![Cloning/Imaging Hard Disks with Clonezilla Live](https://i.ytimg.com/vi/EW4_tqBaczw/default.jpg)
![Restart Computers Remotely with PowerShell](https://i.ytimg.com/vi/czDLFWBZ-JQ/default.jpg)
![Powershell Training - Remotely connect to another computer using PowerShell | Remote PC Connection](https://i.ytimg.com/vi/9j8oMLuOl7A/default.jpg)
![How to Convert Dynamic (Invalid) Disks into Basic Disk without Loss of Data](https://i.ytimg.com/vi/Pqt8_ktNkiw/default.jpg)
![Online Meetings Audio Problems - feedback and volume - fix it!](https://i.ytimg.com/vi/0sKZTFXdaRU/default.jpg)
![Help Desk Tier1 Active Directory User Account Unlock and reset password](https://i.ytimg.com/vi/UnWi79OfTS4/default.jpg)
![Copy, Move, Delete files with PowerShell](https://i.ytimg.com/vi/QuLxJRT3Mhg/default.jpg)
![Learn and use PowerShell with just three commands](https://i.ytimg.com/vi/FiTZgpRpWv0/default.jpg)
![Query DNS using PowerShell cmdlet Resolve-DnsName](https://i.ytimg.com/vi/El1j6bTFwmE/default.jpg)
![Exchange 2013 - Part 1: Pre-reqs and setup](https://i.ytimg.com/vi/AS9uAA-m16E/default.jpg)
![PowerShell Remoting from Windows to Linux](https://i.ytimg.com/vi/UTEYi6bSyNY/default.jpg)
![Use Test-NetConnection to troubleshoot network connections](https://i.ytimg.com/vi/siTE4NqmMWE/default.jpg)
![Use PowerShell - Get IP, Computer, OS, Version, Service Pack in domain](https://i.ytimg.com/vi/6DcafbgUqN0/default.jpg)
![SCCM Software Updates Status Using Powershell | Windows Updates Deployment Status](https://i.ytimg.com/vi/0scOpLBtrBQ/default.jpg)
![how to uninstall a software with powershell script](https://i.ytimg.com/vi/5JQHzPAjriM/default.jpg)
![How to enable AD Recycle Bin and restore deleted objects on Windows Server 2012 R2](https://i.ytimg.com/vi/Apa43eIKrYk/default.jpg)
![How To Get The Full Path Of An AD Group (With CN, OU, DC= Values)](https://i.ytimg.com/vi/0OiCMXdfDxc/default.jpg)
![How to restore deleted Active Directory object in Windows server | Restore user accounts in AD](https://i.ytimg.com/vi/9LvDhTp17i4/default.jpg)
![Quick Tip - Using powershell to (quickly) uninstall software](https://i.ytimg.com/vi/j_iXLRMAYNQ/default.jpg)