Can I execute bat file on MID Server by servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 01:39 AM
Can I launch .bat file on mid server by comand?
Important:
Not through powershell script but directly execute .bat file.
Thanks,
Messaggio modificato da Gaetano De Mitri This solution is correctly? var at = new GlideRecord('ecc_queue'); at.initialize(); at.topic = 'Bat'; at.agent ='mid.server.MID_SERVER_NAME_HERE'; at.state='ready'; at.queue='input'; at.source = 'hr_case:' + sid; at.name = 'example execute batfile'; at.payload = '<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="skip_sensor" value="true"/><parameter name="probe_name" value="example execute batfile"/><parameter name="file.bat parameter1 parameter2" /></parameters>'; at.insert(); I have doubt on payload...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 02:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2017 12:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2017 01:56 PM
function sendCommand(name, midservername, command) {
var ecc_queue = new GlideRecord("ecc_queue");
ecc_queue.initialize();
ecc_queue.agent = "mid.server." + server;
ecc_queue.name = name;
ecc_queue.queue = "output";
ecc_queue.topic = "Command";
ecc_queue.source ="172.31.21.180";
ecc_queue.payload = '<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="name" value="+ command +"/></parameters>';
//Get SysID of new ECC Queue record
var ecc_sysid = ecc_queue.insert();
//gs.addErrorMessage(ecc_sysid);
//Set Response to current record sys_id
ecc_queue.response_to = ecc_sysid;
//Update new ECC Queue record
ecc_queue.update();
return ecc_sysid;
}