Introduced
Site startup, stop, application pool back or expiration (Time out), received requests and sent responses, AppDomains (application domain) of a large number of
Build and close. IIS7 implements a so-called RSCA interface (run-time State and control API) that allows you to monitor what the current system is doing
Job.
IIS 7.0 PowerShell Provider uses this interface and exposes some of its data information in the IIS Provider name space. Through Get-webitemstate,
Start-webitem, Stop-webitem, and Restart-webitem cmdlets to configure the state of the site and application pools. Exposed through the IIS name space
Out of the runtime state such as the currently running worker process, the currently executing request and the loaded application domain (loaded appdomains), and so on.
The sites, applications, and virtual directories used in this article have been created in the previous article.
Site and application pool status
Start querying the status of the Web site.
Site Status
PS IIS:\> cd Sites
PS IIS:\Sites> Get-WebItemState IIS:\Sites\DemoSite
Started
To stop a site using the Stop-webitem cmdlet:
PS IIS:\Sites> Stop-WebItem DemoSite
PS IIS:\Sites> Get-WebItemState IIS:\Sites\DemoSite
Stopped
Of course, the start of the site is also similar to the work:
PS IIS:\Sites> Start-WebItem DemoSite
PS IIS:\Sites> Get-WebItemState IIS:\sites\DemoSite
Started