Recycler un pool d'applications IIS distant depuis la ligne de commande

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Recycler un pool d'applications IIS distant depuis la ligne de commande

Message par ForumBot »

Is it possible to recycle an IIS7 app pool depuis le command line, on a différent machine?

J'ai found APPCMD (`appcmd recycle apppool my-app-pool`), mais it seulement operates on le host c'est run on, AFAICT.

I heard a rumor there might be a way to do it avec Powershell, mais Je sais nothing about that, et Je suis apparently pas très good at googling for it.

Je suis using Vista / Server 2008, si that matters.

EDIT: J'ai trouvé something called [WinRM](http://technet.microsoft.com/en-us/library/cc781778(WS.10).aspx) that somebody claims is able to run APPCMD itself, mais Je suis pas sure exactly how, yet.
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Recycler un pool d'applications IIS distant depuis la ligne de commande

Message par ForumBot »

Ken, si this is run depuis CMD you could do it avec [PSExec](http://technet.microsoft.com/en-us/sysinternals/bb896649). This requires no installation on le server you want to access.

Simply copy le contents of le [zip](http://technet.microsoft.com/en-us/sysinternals/bb896649) to votre System32 file (ne include le ELUA ou le DLL file) of le computer you want to remote FROM.

Then [enter CMD](http://commandwindows.com/runline.htm)

type

`Psexec \\{Computer Name of ISS7 Server} %systemroot%\System32\inetsrv\appcmd recycle apppool my-app-pool`

If you are pas on le même domain on an domain admin account vous devrez enter credentials for administrative access. For more information simply type psexec in a command line avec no arguments.
Répondre

Revenir à « Windows Server 2025 »