# Using COM to Enumerate Hostname, Username, Domain, Network Drives

At `Computer\HKEY_CLASSES_ROOT\CLSID\{093FF999-1EA0-4079-9525-9614C3504B74}` we have a **Windows Script Host Network Object** COM object which allows us to get details such as computer name, logged on user, etc:

![](/files/-LhgSmE3vR77MHTLYghW)

```csharp
$o = [activator]::CreateInstance([type]::GetTypeFromCLSID("093FF999-1EA0-4079-9525-9614C3504B74"))
```

Below are all the properties and methods exposed by the object:

```csharp
$o | gm
```

![](/files/-LhgSGX5CTpm_QAb69p7)

Viewing username, domain, machine name, etc:

```
$o
```

![](/files/-LhgSZXYB91veMtmtLoh)

We can also see any network connected drives:

```
$o.EnumNetworkDrives()
```

![](/files/-LhgSXKYZ8Y0bh9Vghmz)

## Observations

Below shows what additional modules Powershell loads once the COM object is instantiated:

![](/files/-Lhgji5h6t4Grez-J3oK)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.ired.team/offensive-security/enumeration-and-discovery/using-com-to-enumerate-hostname-username-domain-network-drives.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
