Active Directory kullanılmayan bilgisayarları filitreleme

Mustafa Ülker
1 min readMar 2, 2020

1 yıldır giriş yapılmayan bilgisayarları disable yapmak için

$datecutoff = (Get-Date).AddDays(-365)
Get-ADComputer -Properties LastLogonDate -Filter {LastLogonDate -lt $datecutoff} | Set-ADComputer -Enabled $false -whatif

en sondaki whatif eğer anlamında eğer gördüklerinizi disable yapmak isterseniz. whatif yazısını silip tekrar kodu çalıştırın.

Sonuç Etkileyici. Lüzumsuz bilgisayar isimleri silindi gitti.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response