APPCMD.EXE is located in %WINDIR%\
system32\inetsrv. This path doesn??™t exist in the default system or user path, so you??™ll have
to add it to your path environment or simply navigate to %WINDIR%\system32\inetsrv
from the command prompt to run it.
Not only can APPCMD.EXE be used to configure your server, it can also be used to
query information about the objects on your server and to query requests coming into
your server. For example, run the following to list all the sites on your server:
Appcmd.exe list SITE
This command shows the names of all the sites on your server, its internal identifier,
bindings (protocol and port), and state. The results of this command are shown in
Figure 6-10. As you can see, Default Web Site is starting and is listening to HTTP requests
on port 80. If you like to write shell scripts, you can see that the output of this command
is very script-friendly by having the output delimited by unique delimiters. This is useful,
since elements such as the site??™s ID are a required parameter in other commands.
APPCMD.EXE commands always follow this syntax:
APPCMD
[identifier] [-argument1:value1 ??¦]
The only two required parameters are and . In the preceding
site listing example, the object-type is SITE and the verb is list. The verbs (actions)
available depend on the object-type against which APPCMD.
Pages:
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244