Sistem yöneticilerinin, sistemi yönetirken bilmeleri gereken bilgilerden biri de hangi bilgisayarda hangi hesabın oturum açtığı bilgisidir. Bu bilgiye basit bir powershell komutu ile ulaşabiliriz.
Sorguyu yapmak için kullanabileceğimiz powershell sorgusu:
$select = "E" do { $computer=read-host "Bilgisayar adı / IP Girin" if (Test-Connection -ComputerName $computer -Quiet -Count 2 -Delay 1) { gwmi win32_computersystem -comp $computer | select USername,Caption,Manufacturer,Model | out-host } else { Write-Host "$computer makinesine ulaşılamıyor" -ForegroundColor Red | Out-Host } $select = Read-Host "Başka bilgisayar sorgulama için E basın" $select } while ($select -eq "E")