ServiceNow CLI에 대한 도움 받기

  • 릴리스 버전: Zurich
  • 업데이트 날짜 2025년 07월 31일
  • 소요 시간: 3분
  • 사용 가능한 명령, 명령 옵션 및 예제를 확인하거나 디버그 로깅 출력을 생성합니다.

    시작하기 전에

    이 태스크 정보

    debug logging 출력 옵션 외에도 CLI는 모든 명령 실행을 다음 위치의 로그 파일에 기록합니다.

    • Linux 및 Mac: ~/.snc/.logs.
    • Windows:%USERPROFILE%\.snc\.logs.

    프로시저

    1. 사용 가능한 명령과 인수를 보려면 시스템의 명령줄 도구를 열고 도움이 필요한 명령을 입력한 다음 --help 인수를 입력합니다.

      다음 예에서는 사용 가능한 최상위 명령에 대한 도움말을 표시합니다.

      $ snc --help

      다음 예시에서는 사용 가능한 프로파일별 명령을 보여줍니다.

      $ snc configure profile --help

      CLI는 요청된 명령에 대한 도움말을 8개의 섹션으로 나누어 표시합니다.

      이름

      명령의 이름입니다.

      Name
           set
      설명

      명령이 수행하는 작업과 반환 값에 대한 설명입니다.

      Description
           Configure connection profiles. This command is interactive and will prompt you for each configuration value.
      시놉시스

      명령과 해당 옵션을 사용하기 위한 기본 구문입니다.

      Synopsis
           snc configure profile set [arguments]
      사용 가능한 명령

      현재 명령 그룹에서 사용할 수 있는 명령입니다.

      Available Commands
       list    : Lists the configured connection profiles.
       refresh : Updates the available commands from the instance for the given profile.
       remove  : Removes the specified connection profile.
       set     : Configures connection profiles in order to communicate with an instance.
      명령 그룹

      현재 명령 그룹에서 사용할 수 있는 명령 그룹입니다.

      Command Groups
           profile : Set, view, and remove connection profiles.
      인수

      명령이 수락하는 각 인수에 대한 설명입니다.

      Arguments
           -p, --profile string : Use a specific connection profile when executing a command.
      전역 인수

      명령이 수락하는 전역 인수입니다.

      Global Arguments
           -d, --debug Print logs to console.
           -h, --help Display detailed help information.
           -o, --output string Set the format for printing command output.
      예제

      요청된 명령의 예입니다.

      Examples
         Create a new profile to save as the default:
            $ snc configure profile set
               Host:
               Login method:
               Username:
               Password:
               Client id:
               Client secret:
    2. 디버그 로깅 출력을 생성하려면 시스템의 명령줄 도구를 열고 디버그할 명령을 입력한 다음 --debug 인수를 입력합니다.

      다음 예제에서는 작업을 수행하려고 할 때 디버그 로깅 출력을 생성합니다.

      $ snc record delete --table incident --sysid 552c48888c033300964f4932b03eb092 --debug
      CLI는 명령을 실행할 때 디버그 로깅 출력을 생성합니다.