명령줄을 통해 원격으로 IIS에서 특정 앱 풀을 다시 시작하려면 어떻게 해야 합니까?

명령줄을 통해 원격으로 IIS에서 특정 앱 풀을 다시 시작하려면 어떻게 해야 합니까?

저는 박스의 관리자이고 박스에 로그인하지 않고도 특정 앱 풀을 중지/시작하고 싶습니다.

이 작업을 수행하는 명령줄이 있나요?

답변1

컴퓨터에 있는 경우 다음 명령을 사용하면 됩니다. 이제 이것은 원격 명령이 아닙니다. 그러나 웹 서버에 CIFS가 열려 있는 경우 PSEXEC를 사용하여 이를 수행할 수 있습니다. RDP 또는 PSEXEC를 서버에 연결할 수 없거나 원하지 않는 경우 해당 프로토콜이 활성화/설치되어 있으면 텔넷 또는 SSH를 통해 호출할 수도 있습니다.

C:\WINDOWS\system32>iisapp.vbs /?
Description: list IIS application pools and associated worker processes.
             Recycle application pools.

Syntax: IIsApp.vbs [{ /a <app_pool_id> | /p <pid> } [/r] ]

Parameters:

Value              Description
/a <app_pool_id>   Specify an application pool by name. Surround
                   <app_pool_id> with quotes if it contains spaces.
                   If used alone without an accompanying action,
                   IIsApp.vbs will report PIDs of currently running
                   w3wp.exe processes serving pool <app_pool_id>.
/p <pid>           Specify a process by process ID. If used alone
                   without an accompanying action, IIsApp.vbs will
                   report the AppPoolId of the w3wp process specified
                   by <pid>. When a PID is specified with /r, that PID
                   is mapped to an application pool and the action is
                   taken upon the application pool. If a PID is given
                   for a web garden, i.e. an application pool served
                   by more than one w3wp, then all w3wp's for that
                   application pool will be acted upon.
/r                 Recycles the application pool.

DEFAULT: no switches will print out the PID and AppPoolId.

관련 정보