作成 2010.01.05
更新 2010.01.05
更新 2010.01.05
MACアドレスを取得する
<job id="get mac address"> <comment> </comment> <object id="wmiLocator" progid="WbemScripting.SWbemLocator" /> <script language="VBScript"> Option Explicit Dim wmiService Dim nicInstance Dim nicEnumerator Dim outList Set wmiService = wmiLocator.ConnectServer Set nicInstance = wmiService.ExecQuery _ ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True") For Each nicEnumerator In nicInstance outList = outList + vbNewLine + nicEnumerator.Caption + " ---- " + nicEnumerator.MACAddress Next WScript.Echo outList </script> </job>