Wmic.js是WindowsManagementInstrumentationCLI(WMIC)的Node.js接口。
使用方法:
1.启动WMIC:
sc start winmgmt // Start WMI Servicesc query winmgmt // Check if the service is running2.使用Wmic.js:
wmic().alias('NICConfig').where('Index', 1);// Equals towmic().alias('NICConfig').where('Index', '=', 1);// You can also use other operatorswmic().alias('NICConfig').where('Description', 'LIKE', '%WAN%');// Use orWhere to give an alternative conditionwmic().alias('NICConfig').where('Description', 'LIKE', '%WAN%').orWhere('Description', 'LIKE', '%LAN%');
评论