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

The information we need is contained here in the registry:



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"



Answer Summary:
0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



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)
Answered 08/13/2013 by: dugullett
Red Belt

  • Good work sir. Thanks.
    • 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)
      • I need to get some more PowerShell chops.. What's a good online source for dummies / newbee's.
      • I learned a lot here. To me it makes more sense than VB.
  • Powershell is definitely handy to have in the toolbox.
  • 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.
  • You could also report on MACHINE_NICS.DHCP_ENABLED.
Please log in to comment