> For the complete documentation index, see [llms.txt](https://cajac.gitbook.io/ctf-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cajac.gitbook.io/ctf-notes/enum/ad-discovery/local-enumeration/get-computer-info-locally.md).

# Get Computer Info Locally

## Get Computer Information

### Get-ADComputer

[Get-ADComputer](https://learn.microsoft.com/en-us/powershell/module/activedirectory/get-adcomputer?view=windowsserver2022-ps) from the Windows [Remote Server Administration Tools](https://learn.microsoft.com/en-us/troubleshoot/windows-server/system-management-components/remote-server-administration-tools) (RSAT)

#### Get different properties <a href="#remote-server-administration-tools-rsat-for-windows" id="remote-server-administration-tools-rsat-for-windows"></a>

{% hint style="info" %}
NOTE

Get-ADComputer will show the properties in alphabetical order!
{% endhint %}

To list the most basic information about a specific computer in the domain

```powershell
Get-ADComputer <comp_name> -Properties * | select Name, DNSHostName, DistinguishedName, Description, OperatingSystem, OperatingSystemVersion, IPv4Address
```

To list more detailed information about a specific computer in the domain

```powershell
Get-ADComputer <comp_name> -Properties * | select Name, DNSHostName, DistinguishedName, SamAccountName, CanonicalName, Description, OperatingSystem, OperatingSystemVersion, IPv4Address, LastLogonDate, logonCount, MemberOf, Created, Modified, SID
```

<details>

<summary>Example run</summary>

```powershell
```

</details>

## Resources

Get-ADComputer - Microsoft Learn: <https://learn.microsoft.com/en-us/powershell/module/activedirectory/get-adcomputer?view=windowsserver2022-ps>

Remote Server Administration Tools (RSAT) - Microsoft Learn: <https://learn.microsoft.com/en-us/troubleshoot/windows-server/system-management-components/remote-server-administration-tools>
