Loading WebAdministration module

Sep 16, 2013 at 7:09 PM
Edited Sep 17, 2013 at 1:01 AM
In Windows Server 2012, this is not necessary. It is already loaded. But, this is not true in Windows Server 2008 R2.

Or, atleast I have found out that this line of code is not necessary in Windows Server 2012 (in autoSPInstallerFunctions.ps1):
Function ConfigureIISLogging([xml]$xmlinput)
    $IISLogConfig = $xmlinput.Configuration.Farm.Logging.IISLogs
    Write-Host -ForegroundColor White " - Configuring IIS logging..."
    If (!([string]::IsNullOrEmpty($IISLogConfig.Path)))
        $IISLogDir = $IISLogConfig.Path
        EnsureFolder $IISLogDir
        ImportWebAdministration          <-----------------------------------------------this line
        $oldIISLogDir = Get-WebConfigurationProperty "/system.applicationHost/sites/siteDefaults" -name logfile.directory.Value
        $oldIISLogDir = $oldIISLogDir -replace ("%SystemDrive%","$env:SystemDrive")ve")