MIDServer : Global

  • Freigeben Version: Xanadu
  • Aktualisiert 1. August 2024
  • 19 Minuten Lesedauer
  • Die MIDServer-Skripteinbindung stellt Methoden bereit, um das Konzept eines MID-Serverzu kapseln.

    Verwenden Sie diese Methoden in Serverskripts, um ein MID-Server mit Ajax zu verwalten.

    MIDServer – getByName(String name)

    Gibt den angegebenen MID-Server zurück.

    Tabelle : 1. Parameter
    Name Typ Beschreibung
    Name Zeichenfolge Der Name des MID-Servers
    Tabelle : 2. Ergebnisse
    Typ Beschreibung
    GlideRecord Der Datensatz des angeforderten MID-Servers.

    Das folgende Beispiel zeigt, wie Sie auf MID-Server-Details zugreifen und sie anzeigen können.

    // Get a mid server object by name
    var ms = MIDServer.getByName("windows_mid");
    
    // Stringify the object for display purposes
    gs.info(JSON.stringify(ms, null, 2));
    
    // Show the value of each API property 
    gs.info('hostmane ' + ms.hostname);
    gs.info('hostOS ' + ms.hostOS);
    gs.info('ip ' + ms.ip);
    gs.info('name ' + ms.name);
    gs.info('routerIP ' + ms.routerIP);
    gs.info('status ' + ms.status);
    gs.info('sysID ' + ms.sysID);
    gs.info('url ' + ms.url);
    gs.info('version ' + ms.version);
    gs.info('windowsDomain ' + ms.windowsDomain);

    Ausgabe:

    *** Script: {
      "valid": true,
      "sysID": "3cb25f0f874b3410c3a99999cebb35ba",
      "name": "windows_mid",
      "url": null,
      "hostname": "myHostname.service-now.com",
      "hostOS": "Windows",
      "version": "fixed",
      "ip": "10.11.128.184",
      "routerIP": "10.11.128.1",
      "network": "10.11.128.0/22",
      "windowsDomain": null,
      "status": "Up",
      "validated": "true",
      "userName": "MID_Profile"
    }
    *** Script: hostname myHostname.service-now.com
    *** Script: hostOS Windows
    *** Script: ip 10.11.128.184
    *** Script: name windows_mid
    *** Script: routerIP 10.11.128.1
    *** Script: status Up
    *** Script: sysID 3cb25f0f874b3410c3a99999cebb35ba
    *** Script: url null
    *** Script: version fixed
    *** Script: windowsDomain null
    

    MIDServer – getDefault(DiscoverySchedule schedule)

    Gibt den MID-Server zurück, der dem angegebenen Zeitplan zugeordnet ist (der MID-Server mit demselben Namen). Wenn kein MID-Server zugeordnet ist, wird der nächste MID-Server in der Tabelle „ecc_agent“ abgerufen.

    Tabelle : 3. Parameter
    Name Typ Beschreibung
    schedule DiscoverySchedule Der Discovery-Zeitplan
    Tabelle : 4. Ergebnisse
    Typ Beschreibung
    GlideRecord Der MID-Server

    MIDServer – getForPing(DiscoverySchedule schedule, DiscoveryRange range)

    Gibt den MID-Server mit dem angegebenen Zeitplan und Bereichssatz zurück.

    Tabelle : 5. Parameter
    Name Typ Beschreibung
    schedule DiscoverySchedule Der Discovery-Zeitplan
    range DiscoveryRange Der Discovery-Bereichssatz
    Tabelle : 6. Ergebnisse
    Typ Beschreibung
    GlideRecord Der MID-Server

    MIDServer – hostname

    Der Name des Hosts des MID-Servers.

    Tabelle : 7. Feld
    Name Typ Beschreibung
    hostname Zeichenfolge Der Name des Hosts des MID-Servers.

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null
    q

    MIDServer – hostOS

    Das Betriebssystem des Hosts des MID-Servers.

    Tabelle : 8. Feld
    Name Typ Beschreibung
    hostOS Zeichenfolge Das Betriebssystem des Hosts des MID-Servers.

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer – ip

    Die IP-Adresse des Hosts des MID-Servers.

    Tabelle : 9. Feld
    Name Typ Beschreibung
    ip Zeichenfolge Die IP-Adresse des Hosts des MID-Servers.

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer – name

    Der Name des MID-Servers.

    Tabelle : 10. Feld
    Name Typ Beschreibung
    Name Zeichenfolge Name des MID-Servers

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer – network

    Das Netzwerk, das den Host des MID-Servers enthält.

    Tabelle : 11. Feld
    Name Typ Beschreibung
    network Zeichenfolge Das Netzwerk, das den Host des MID-Servers enthält. Zum Beispiel „10.10.10.0/24“ oder „10.10.10.0/255.255.255.0“.

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer – routerIP

    Die IP-Adresse des Standardrouters des MID-Server-Hosts.

    Tabelle : 12. Feld
    Name Typ Beschreibung
    routerIP Zeichenfolge Die IP-Adresse des Standardrouters des MID-Server-Hosts.

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer – status

    Der Status des MID-Servers („Up“ oder „Down“).

    Tabelle : 13. Feld
    Name Typ Beschreibung
    Status Zeichenfolge Der Status des MID-Servers („Up“ oder „Down“).

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer – sysID

    Die sys_id des MID-Server-Datensatzes.

    Tabelle : 14. Feld
    Name Typ Beschreibung
    sysID Zeichenfolge Die sys_id des MID-Server-Datensatzes.

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer – url

    Die URL, mit der der MID-Server die Instanz kontaktiert.

    Tabelle : 15. Feld
    Name Typ Beschreibung
    URL Zeichenfolge Die URL, mit der der MID-Server die Instanz kontaktiert.

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer – version

    Version des MID-Servers (WAR-Name).

    Tabelle : 16. Feld
    Name Typ Beschreibung
    Version Zeichenfolge Version des MID-Servers (WAR-Name).

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null

    MIDServer – windowsDomain

    Windows-Domäne des MID-Server-Hosts (wenn es sich um einen Windows-Computer handelt).

    Tabelle : 17. Feld
    Name Typ Beschreibung
    windowsDomain Zeichenfolge Die Windows-Domäne des MID-Server-Hosts.

    Das folgende Beispiel zeigt, wie alle Parameter eines verfügbaren MID-Servers ausgeführt und zurückgegeben werden.

    var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
    var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
    var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
    var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
    var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
    var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
    var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
    var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
    var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
    var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
    var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
    
    gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
    \nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " +  midServerStatus  + 
    "\nMID Server SYS ID - " + midServerSysID  + "\nMID Server URL - " + midServerURL  + "\nMID Server Version - " + midServerVersion + 
    "\nMID Server Windows Domain - " + midServerwindowsDomain);

    Ausgabe:

    MID Server Host Name - midSvrName.service-now.com
    Mid Server Host OS - Windows
    MID Server IP - 10.11.999.999
    MID Server Name - Windows MID
    MID Server Router IP - 10.11.111.1
    MID Server Status - Up
    MID Server SYS ID - <mid_sys_id>
    MID Server URL - null
    MID Server Version - fixed
    MID Server Windows Domain - null