Skip to content

Instantly share code, notes, and snippets.

@uialberto
Created May 30, 2020 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uialberto/4d15474238fc62db87cedad7653d62e0 to your computer and use it in GitHub Desktop.
Save uialberto/4d15474238fc62db87cedad7653d62e0 to your computer and use it in GitHub Desktop.
Verificación IIS Server Configuracion - Windows PowerShell ISE
$configSection = Get-IISConfigSection -SectionPath "system.applicationHost/sites"
$state = Get-IISConfigCollection $configSection | Get-IISConfigCollectionElement -ConfigAttribute @{"Name"="Default Web Site"} | Get-IISConfigAttributeValue -AttributeName "State"
if($state -eq "Started")
{
Write-Host "Default Web Site esta iniciado" -ForegroundColor Green
}else
{
Write-Host "Default Web Site no esta iniciado" -ForegroundColor Red
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment