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:
1
$o = [activator]::CreateInstance([type]::GetTypeFromCLSID("093FF999-1EA0-4079-9525-9614C3504B74"))
Copied!
Below are all the properties and methods exposed by the object:
1
$o | gm
Copied!
Viewing username, domain, machine name, etc:
1
$o
Copied!
We can also see any network connected drives:
1
$o.EnumNetworkDrives()
Copied!

Observations

Below shows what additional modules Powershell loads once the COM object is instantiated:
Last modified 2yr ago
Copy link
Contents
Observations