> For the complete documentation index, see [llms.txt](https://www.ired.team/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.ired.team/offensive-security/enumeration-and-discovery/using-com-to-enumerate-hostname-username-domain-network-drives.md).

# 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)
