|
|
Line 1: |
Line 1: |
| == Meeskond ==
| |
| Liikmed:
| |
|
| |
|
| Urmo Laaneots
| |
|
| |
| Oliver Kilk
| |
|
| |
| Karet Rikko
| |
|
| |
| Erko Umal
| |
|
| |
| == Lähteülesanne ==
| |
|
| |
| Koosta skript, mis:
| |
|
| |
| paigaldaks IIS veebiserveri
| |
|
| |
| Kustutaks Default Web Site
| |
|
| |
| Looks uue veebilehe, mille füüsiline asukoht oleks C:\www
| |
|
| |
| Kontrolliks ka eelnevalt kataloogi olemasolu ning vajadusel looks selle
| |
|
| |
| Koosta skrpit, mis genereeriks veebilehe, mis sisaldaks töötavate protsesside loetelu ja nende ressursikasutusesinfot ja viimast viit kirjet system EventLog'ist
| |
|
| |
| See skript peab väskendama infot viieminutilise intervalliga
| |
|
| |
| == IIS'i paigaldamine ==
| |
|
| |
| echo "IISI paigaldamine"
| |
|
| |
| Import-Module servermanager
| |
|
| |
| Add-WindowsFeature Web-Server
| |
|
| |
| Import-Module WebAdministration
| |
|
| |
|
| |
| == Default lehekülje kustutamine ==
| |
|
| |
| echo "default lehe kustutamine"
| |
|
| |
| Stop-Website "Default Web Site"
| |
|
| |
|
| |
| == Veebilehe tegemine ==
| |
|
| |
| echo "Loon kataloogi C:\inetpub\uus"
| |
|
| |
| if (!(Test-Path -path C:\inetpub\uus)) {New-Item C:\inetpub\uus -type "directory"} else {"Kaust Olemas"}
| |
|
| |
|
| |
| echo "Lisan uue veebilehe"
| |
|
| |
| New-Item IIS:\Sites\testikas -bindings @{protocol="http";bindingInformation=":80:localhost"} -physicalPath C:\www\
| |
|
| |
| == Raporti genereerimine ==
| |
|
| |
| echo "Informatsiooni saab lehelt http://localhost/ "
| |
|
| |
| while(1) {
| |
|
| |
| $date=date
| |
|
| |
| echo "Viimane värskendus: $date" > C:\inetpub\uus\index.html
| |
|
| |
| Get-Process | ConvertTo-Html >> C:\inetpub\uus\index.html
| |
|
| |
| Get-EventLog system -newest 5 | ConvertTo-Html >> C:\inetpub\uus\index.html
| |
|
| |
| sleep -s 300}
| |