diff --git a/Build/Automate/CS1/Build.ps1 b/Build/Automate/CS1/Build.ps1 index 5e25690..ee70104 100644 --- a/Build/Automate/CS1/Build.ps1 +++ b/Build/Automate/CS1/Build.ps1 @@ -23,6 +23,8 @@ If (([System.Environment]::OSVersion.Version.Major -eq 6) -and ([System.Environm Start-Process schtasks -ArgumentList ' /Change /TN "\Microsoft\Windows\Server Manager\ServerManager" /DISABLE' -Wait -Verb RunAs Write-BuildLog "Disabling screen saver" set-ItemProperty -path 'HKCU:\Control Panel\Desktop' -name ScreenSaveActive -value 0 + Write-BuildLog "Install admin tools" + Add-WindowsFeature RSAT-Feature-Tools,RSAT-DHCP,RSAT-DNS-Server,RSAT-AD-AdminCenter } $Files = get-childitem "b:\view$viewinstall" for ($i=0; $i -lt $files.Count; $i++) { @@ -86,7 +88,7 @@ if (([bool]($emailto -as [Net.Mail.MailAddress])) -and ($SmtpServer -ne "none")) $Summary += "The build log is attached`r`n" $mailmessage.Subject = "$env:computername VM build finished" $mailmessage.Body = $Summary - $attach = new-object Net.Mail.Attachment("C:\buildlog.txt", 'text/plain') + $attach = new-object Net.Mail.Attachment("C:\buildlog.txt") $mailmessage.Attachments.Add($attach) $message.Attachments.Add($attach) $SMTPClient.Send($mailmessage) diff --git a/Build/Automate/CS2/Build.ps1 b/Build/Automate/CS2/Build.ps1 index 94b7d7e..aa333d8 100644 --- a/Build/Automate/CS2/Build.ps1 +++ b/Build/Automate/CS2/Build.ps1 @@ -22,6 +22,8 @@ If (([System.Environment]::OSVersion.Version.Major -eq 6) -and ([System.Environm Start-Process schtasks -ArgumentList ' /Change /TN "\Microsoft\Windows\Server Manager\ServerManager" /DISABLE' -Wait -Verb RunAs Write-BuildLog "Disabling screen saver" set-ItemProperty -path 'HKCU:\Control Panel\Desktop' -name ScreenSaveActive -value 0 + Write-BuildLog "Install admin tools" + Add-WindowsFeature RSAT-Feature-Tools,RSAT-DHCP,RSAT-DNS-Server,RSAT-AD-AdminCenter } if (Test-Path "C:\VMware-view*") { $Files = get-childitem "C:\" @@ -91,7 +93,7 @@ if (([bool]($emailto -as [Net.Mail.MailAddress])) -and ($SmtpServer -ne "none")) $Summary += "The build log is attached`r`n" $mailmessage.Subject = "$env:computername VM build finished" $mailmessage.Body = $Summary - $attach = new-object Net.Mail.Attachment("C:\buildlog.txt", 'text/plain') + $attach = new-object Net.Mail.Attachment("C:\buildlog.txt") $mailmessage.Attachments.Add($attach) $message.Attachments.Add($attach) $SMTPClient.Send($mailmessage) diff --git a/Build/Automate/DC/Phase2.ps1 b/Build/Automate/DC/Phase2.ps1 index a94fa89..38f8d25 100644 --- a/Build/Automate/DC/Phase2.ps1 +++ b/Build/Automate/DC/Phase2.ps1 @@ -453,7 +453,7 @@ if (Test-Path "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\sqlcmd.exe") exit } } -If (((([System.Environment]::OSVersion.Version.Major *10) +[System.Environment]::OSVersion.Version.Minor) -le 62)) { +If (((([System.Environment]::OSVersion.Version.Major *10) +[System.Environment]::OSVersion.Version.Minor) -le 61)) { Write-BuildLog "Doing Windows Server 2008 specific build actions" if (Test-Path B:\sqlmsssetup.exe) { Rename-Item B:\sqlmsssetup.exe SQLManagementStudio_x64_ENU.exe @@ -571,7 +571,7 @@ if (($vmtools) -and (-Not (Test-Path "C:\Program Files\VMware\VMware Tools\VMwar $Summary += "The build log is attached`r`n" $mailmessage.Subject = "$env:computername VM build finished" $mailmessage.Body = $Summary - $attach = new-object Net.Mail.Attachment("C:\buildlog.txt", 'text/plain') + $attach = new-object Net.Mail.Attachment("C:\buildlog.txt") $mailmessage.Attachments.Add($attach) $message.Attachments.Add($attach) $SMTPClient.Send($mailmessage) diff --git a/Build/Automate/SS/Build.ps1 b/Build/Automate/SS/Build.ps1 index 26e6b83..8d67efa 100644 --- a/Build/Automate/SS/Build.ps1 +++ b/Build/Automate/SS/Build.ps1 @@ -22,6 +22,8 @@ If (([System.Environment]::OSVersion.Version.Major -eq 6) -and ([System.Environm Start-Process schtasks -ArgumentList ' /Change /TN "\Microsoft\Windows\Server Manager\ServerManager" /DISABLE' -Wait -Verb RunAs Write-BuildLog "Disabling screen saver" set-ItemProperty -path 'HKCU:\Control Panel\Desktop' -name ScreenSaveActive -value 0 + Write-BuildLog "Install admin tools" + Add-WindowsFeature RSAT-Feature-Tools,RSAT-DHCP,RSAT-DNS-Server,RSAT-AD-AdminCenter } $Files = get-childitem "b:\view$viewinstall" for ($i=0; $i -lt $files.Count; $i++) { @@ -81,7 +83,7 @@ if (([bool]($emailto -as [Net.Mail.MailAddress])) -and ($SmtpServer -ne "none")) $Summary += "The build log is attached`r`n" $mailmessage.Subject = "$env:computername VM build finished" $mailmessage.Body = $Summary - $attach = new-object Net.Mail.Attachment("C:\buildlog.txt", 'text/plain') + $attach = new-object Net.Mail.Attachment("C:\buildlog.txt") $mailmessage.Attachments.Add($attach) $message.Attachments.Add($attach) $SMTPClient.Send($mailmessage) diff --git a/Build/Automate/VC/Build.ps1 b/Build/Automate/VC/Build.ps1 index f9b91b9..f0d68a1 100644 --- a/Build/Automate/VC/Build.ps1 +++ b/Build/Automate/VC/Build.ps1 @@ -639,7 +639,7 @@ if (Test-Path B:\VMTools\setup64.exe) { $Summary += "The build log is attached`r`n" $mailmessage.Subject = "$env:computername VM build finished" $mailmessage.Body = $Summary - $attach = new-object Net.Mail.Attachment("C:\buildlog.txt", 'text/plain') + $attach = new-object Net.Mail.Attachment("C:\buildlog.txt") $mailmessage.Attachments.Add($attach) $SMTPClient.Send($mailmessage) }