Wie starte ich einen bestimmten App-Pool auf IIS remote über eine Befehlszeile neu?

Wie starte ich einen bestimmten App-Pool auf IIS remote über eine Befehlszeile neu?

Ich bin Admin auf der Box und möchte einen bestimmten App-Pool stoppen/starten, ohne mich bei der Box anmelden zu müssen.

Gibt es eine Befehlszeile für diese Aufgabe?

Antwort1

Der folgende Befehl erledigt dies, wenn Sie sich auf der Maschine befinden. Dies ist kein Remote-Befehl. Aber wenn Sie CIFS für den Webserver geöffnet haben, können Sie dies mit PSEXEC tun. Wenn Sie nicht per RDP oder PSEXEC auf den Server zugreifen können/wollen, können Sie ihn auch über Telnet oder SSH aufrufen, wenn Sie diese Protokolle aktiviert/installiert haben.

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.

verwandte Informationen