PowerShell ile Etki Alanındaki Kapalı Durumda Olan Bilgisayarları Listeleme
![Resim](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVPWgC6n4fIHQSfBbj3xAFaGCTgYYx86Qu8wgaFWyyYr-of6o_TH2WFhiwmXVYAffRcEmfeHo1fjvhhyphenhyphenNADu84FQoOhrosQUHxlKJR_Ehz2vgURvOpdLkNZiQ85HcVD9Gj32ZgOAEnJfs94JSsMFK-6g_QW6JPdP7QKmPvkE6hg7GEdfZ3jp-hVJ-hhQ/w640-h396/1620054291047.png)
Powershell konsolunu yönetici olarak açalım. Aşağıdaki kod çalıştıralım. Kapalı olan bilgisayarlarıda C'nin altında errors.txt dosyasına yazıldığını görebilirsiniz... $computers=Get-ADComputer -filter * foreach ($computer in $computers) { try { Get-CimInstance win32_share -computername $computer.name -ErrorAction stop } catch { $computer.name > c:\errors.txt } }