/build/static/layout/Breadcrumb_cap_w.png

Custom Inventory wildcard

Needing to find all machines in our environment that have a static IP address.

The information we need is contained here in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\{08E64730-E8A7-48A5-9912-88BAA0ABBDE3}

 

The problem is that the last bit of the registry entry is random letters and numbers. How can I program that into the custom inventory to look in the correct folder?

The actual value name is "IPAddress"

 

Thanks.


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: dugullett 11 years ago
Red Belt
2

Not sure about the wildcard, but something like this should work. You should then be able to turn this into a report.

ShellCommandTextReturn(powershell Get-WmiObject Win32_NetworkAdapterConfiguration -filter 'ipenabled= "true"'|Select Description, IPAddress, DHCPEnabled| Format-List)

Comments:
  • Good work sir. Thanks. - AFCUjstrick 11 years ago
    • To clean the report up some you may want to just search for machines with DHCP not enabled.

      ShellCommandTextReturn(powershell Get-WmiObject Win32_NetworkAdapterConfiguration -filter 'ipenabled= "true"'|where {$_.dhcpenabled -like 'False'}|Select Description, IPAddress, DHCPEnabled| Format-List) - dugullett 11 years ago
      • I need to get some more PowerShell chops.. What's a good online source for dummies / newbee's. - ekgcorp 11 years ago
      • I learned a lot here. To me it makes more sense than VB.

        http://www.itninja.com/link/learn-powershell - dugullett 11 years ago
  • Powershell is definitely handy to have in the toolbox. - AFCUjstrick 11 years ago
  • Also note: Anything you can "Get-WmiObject" in PowerShell, you can probably query in a batch file using WMIC. Of course, in a batch file, the parsing of the results is more difficult. - snissen 11 years ago
  • You could also report on MACHINE_NICS.DHCP_ENABLED. - grayematter 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ