Simon Mourier's Avatar
Simon Mourier's blog (1807 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI3, AOT, P/Invoke, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • com
  • web
  • wmi

WMI query to get remote IP info using PHP

May 22, 2013 See the question and my original answer on StackOverflow

You need to create an intermediary WbemScripting.SWbemLocator object, something like this:

$loc = new COM( "WbemScripting.SWbemLocator" );
$obj = $loc->ConnectServer( "hostname", "rootcimv2", "user", "password" );
  • SmoBlog © 2010-2026 Simon Mourier. All rights reserved.
  • Privacy & Terms