MIDServer - 전역

  • 릴리스 버전: Zurich
  • 업데이트 날짜 2025년 07월 31일
  • 소요 시간: 42분
  • MIDServer 스크립트 포함은 .MID 서버

    서버 스크립트에서 이러한 메서드를 사용하여 Ajax 사용을 관리합니다 MID 서버 .

    MIDServer - getByName(문자열 이름)

    지정된 MID 서버를 반환합니다.

    표 1. 매개변수
    이름 유형 설명
    이름 문자열 MID 서버 이름
    표 2. 반환
    유형 설명
    GlideRecord 요청된 MID Server의 기록입니다.

    다음 예는 MID 서버 상세 정보에 액세스하고 표시하는 방법을 보여줍니다.

    // 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);

    출력:

    *** 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 일정)

    지정된 일정과 연결된 MID 서버(이름이 같은 MID 서버)를 반환합니다. 연결된 MID 서버가 없는 경우 ecc_agent 테이블의 다음 MID 서버를 가져옵니다.

    표 3. 매개변수
    이름 유형 설명
    일정 디스커버리 일정 검색 일정
    표 4. 반환
    유형 설명
    GlideRecord MID 서버

    MIDServer - getForPing(DiscoverySchedule 일정, DiscoveryRange 범위)

    지정된 일정과 범위 세트로 MID 서버를 반환합니다.

    표 5. 매개변수
    이름 유형 설명
    일정 디스커버리 일정 검색 일정
    레인지 검색 범위 검색 범위 세트
    표 6. 반환
    유형 설명
    GlideRecord MID 서버

    MIDServer - 호스트 이름

    MID 서버 호스트의 이름입니다.

    표 7. 필드
    이름 유형 설명
    hostname 문자열 MID 서버 호스트의 이름입니다.

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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

    MID 서버 호스트의 운영 체제입니다.

    표 8. 필드
    이름 유형 설명
    호스트 OS 문자열 MID 서버 호스트의 운영 체제입니다.

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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

    MID 서버 호스트의 IP 주소입니다.

    표 9. 필드
    이름 유형 설명
    ip 문자열 MID 서버 호스트의 IP 주소입니다.

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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 - 이름

    MID 서버의 이름입니다.

    표 10. 필드
    이름 유형 설명
    이름 문자열 MID 서버의 이름

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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 - 네트워크

    MID Server의 호스트를 포함하는 네트워크입니다.

    표 11. 필드
    이름 유형 설명
    네트워크 문자열 MID Server의 호스트를 포함하는 네트워크입니다. 예: "10.10.10.0/24" 또는 "10.10.10.0/255.255.255.0"

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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

    MID 서버 호스트의 기본 라우터의 IP 주소입니다.

    표 12. 필드
    이름 유형 설명
    라우터IP 문자열 MID 서버 호스트의 기본 라우터의 IP 주소입니다.

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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 - 상태

    MID Server의 상태("Up" 또는 "Down")

    표 13. 필드
    이름 유형 설명
    상태 문자열 MID Server의 상태("Up" 또는 "Down")

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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

    MID 서버 기록의 sys_id입니다.

    표 14. 필드
    이름 유형 설명
    sysID 문자열 MID 서버 기록의 sys_id입니다.

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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

    MID 서버가 인스턴스에 연결하는 데 사용하는 URL입니다.

    표 15. 필드
    이름 유형 설명
    URL 문자열 MID 서버가 인스턴스에 연결하는 데 사용하는 URL입니다.

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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 - 버전

    MID 서버 버전(WAR 이름)입니다.

    표 16. 필드
    이름 유형 설명
    버전 문자열 MID 서버 버전(WAR 이름)입니다.

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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

    MID 서버 호스트의 Windows 도메인(Windows 컴퓨터인 경우).

    표 17. 필드
    이름 유형 설명
    windowsDomain 문자열 MID 서버 호스트의 Windows 도메인입니다.

    다음 예는 사용 가능한 MID 서버의 모든 매개변수를 실행하고 반환하는 방법을 보여줍니다.

    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);

    출력:

    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