> For the complete documentation index, see [llms.txt](https://aidenpearce369.gitbook.io/handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aidenpearce369.gitbook.io/handbook/ad-pentesting/ad-enumeration/enumerating-computers.md).

# Enumerating Computers

### PowerView

Get list of all computers in current domain

```
Get-NetComputer
```

Get list of all computers in another domain

```
Get-NetComputer -Domain <DOMAIN NAME>
```

Pinging machines may give FALSE POSITIVE while probing, when ICMP packets are dropped by firewall

Ping all available computers in current domain

```
Get-NetComputer -Ping
```

Ping all available computers in another domain

```
Get-NetComputer -Ping -Domain <DOMAIN NAME>
```

Get list of all properties for all computers in current domain

```
Get-NetComputer -FullData
```

Get list of all properties of all computers in another domain

```
Get-NetComputer -FullData -Domain <DOMAIN NAME>
```

Get list of computers running with a specific OS in current domain

```
Get-NetComputer -OperatingSystem "*Server 2016*"
```

Get list of computers running with a specific OS in another domain

```
Get-NetComputer -Domain <DOMAIN NAME> -OperatingSystem "*Server 2016*"
```

### Active Directory Module

Get list of all computers in current domain

```
Get-ADComputer -Filter * | Select name
```

Pinging machines may give FALSE POSITIVE while probing, when ICMP packets are dropped by firewall

Ping all available computers in current domain

```
Get-ADComputer -Filter * -Properties DNSHostName | %{Test-Connection -Count 1 -ComputerName $_.DNSHostName}
```
