Is there an efficient way to gather mapped network shares and installed network printers from all profiles on a computer using M42 Empirum? In an older system, we used a couple of PS scripts to accomplish this and the output was stored on each computer record under a Powershell section. I have attempted to use custom WMI queries to accomplish this but they seem to only be reading data from the account that is executing the Inventory app, rather than any (or all) User profiles on the system. I was going to attempt to use a Registry scan but this data is stored in HCU and I am not sure how the system handles wildcards in a Registry value.
WMI Query for Network Shares:
SELECT Name, ProviderName FROM Win32_MappedLogicalDisk
WMI Query for installed Printers:
SELECT Name FROM Win32_Printer
While testing these, I get no values back from the Network Share query and the Printer query only returns local printers that all profiles on our systems have.
Can we use a wildcard in a Registry Scan to drill into HCU,S-1-5-21-##########-#########-##########-*\Network and return each of the keys therein as well as the RemotePath value of each key?
For example, for HKEY_USERS\S-1-5-21-1234567890-123456789-1234567890-12345\Network there are 5 keys nested therein;
Q: RemotePath - \\fileserver1\share1
W: RemotePath - \\fileserver1\share2
E: RemotePath - \\fileserver1\share3
R: RemotePath - \\fileserver2\share1
T: RemotePath - \\fileserver2\share2
Could I capture all of the drive letter keys and the value of the RemotePath REG_SZ String?
For printers, can the same logic be applied but instead, capturing the names of the Keys under \Printers\Connections as well as the Server REG_SZ value nested therein, for each user?
For example, for HKEY_USERS\S-1-5-21-1234567890-123456789-1234567890-12345\Printers\Connections has two keys;
,,printserver1,PrinterName1 | Server: \\printserver1
,,printserver2,PrinterName1 | Server: \\printserver2
Any help with this would be greatly appreciated!
