$obj = new COM ( 'winmgmts://localhost/root/CIMV2' );
$fso = new COM ( "Scripting.FileSystemObject" );
$wmi_computersystem = $obj->ExecQuery("Select * from Win32_ComputerSystem");
$wmi_bios = $obj->ExecQuery("Select * from Win32_BIOS");
$processor = $obj->ExecQuery("Select * from Win32_Processor");
$PhysicalMemory = $obj->ExecQuery("Select * from Win32_PhysicalMemory");
$BaseBoard = $obj->ExecQuery("Select * from Win32_BaseBoard");
$LogicalDisk = $obj->ExecQuery("Select * from Win32_LogicalDisk");
foreach ( $wmi_computersystem as $wmi_call )
{
$model = $wmi_call->Model;
}
foreach ( $wmi_bios as $wmi_call )
{
$serial = $wmi_call->SerialNumber;
$bios_version = $wmi_call->SMBIOSBIOSVersion;
}
i have above code to get the localhost information.and it works well. My question is, To get the remote machine info,where should i put user credentials(username,password of domain administrator)?