Created
May 30, 2020 16:24
-
-
Save uialberto/414df6ab8f3f49e7e3d30e9f828443fa to your computer and use it in GitHub Desktop.
Verificación IIS Server Modulos - Windows PowerShell ISE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$goodmodules = @( | |
"Web-Server", | |
"Web-WebServer", | |
"Web-Common-Http", | |
"Web-Default-Doc", | |
"Web-Default-Doc" | |
) | |
$badmodules = @( | |
"Web-DAV-Publishing", | |
"Web-Windows-Auth" | |
) | |
# Ver si estan instalados los modulos principales | |
foreach ($module in $goodmodules) | |
{ | |
if((Get-WindowsFeature $module).Installed -eq 0) | |
{ | |
Write-Host "Module $module no esta instalado" -ForegroundColor Red | |
} | |
} | |
# Ver si estan instalados los modulos principales | |
foreach ($module in $badmodules) | |
{ | |
if((Get-WindowsFeature $module).Installed -eq 1) | |
{ | |
Write-Host "Module $module no deberia estar instalado" -ForegroundColor Red | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment