Notes about Powershell
Import-Module WebAdministration -ErrorVariable ImportError -OutVariable ImportOut
#[void]$Logging.AppendLine(“Import-Module err : ” + $ImportError)
– The problem is that I need elevated rights to use Get-Website
Or maybe just to Import-Module WebAdministration
Main – function
Scripts are read from the top to the bottom, so you can’t use any references before they are initiated. You could however create a script/scriptblock that simulates how programming languages work.