Virtualizing VSTS 2010 Guidance – how is the automation going?
The Virtualizing VSTS 2010 project is well under way and apart from working on virtualisation guidance around TFS and VSTS, we are also automating the creation and configuration of the VSTS Rangers base image. We are investigating a number of automation solutions, both internal and public solutions, as well as creating a pile of PowerShell scripts to automate the tweaking and customisation of the environment.
Keep an eye on Robert’s blog, where he will most likely share a few PowerShell and general scripting nuggets while we are getting to grips with the automation challenge. We will be including all of the scripts we are writing in the guidance documentation, but in the meantime here is a sample script we use to enable remote desktop as part of the prerequisite optimizations:
1: #<#
2: #.SYNOPSIS
3: # This script enables the remote desktop connectivity
4: #.NOTES
5: # Author : VSTS Rangers
6: # Requires : PowerShell V1
7: #.EXAMPLE
8: # .\EnableRemoteDesktop.ps1
9: #>
10:
11: $terminalServer
12: $rdpTcp
13:
14: # -------------------------------------------------------------------------------------------
15: function EnableRemoteDesktop
16: {
17: # Enable RD and create registryt key if not available
18: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -Value 0 -erroraction silentlycontinue
19: if ( -not $?)
20: {
21: New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -Value 0 -PropertyType dword
22: }
23: # Set security to low
24: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 0 -erroraction silentlycontinue
25: if (-not $?)
26: {
27: New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 0 -PropertyType dword
28: }
29: #enable firewall rule for remote desktop
30: Netsh advfirewall firewall set rule group=”Remote Desktop” new enable=yes
31: }
32:
33: # -Main--------------------------------------------------------------------------------------
34: EnableRemoteDesktop
You should not reset remote desktop support to prepare for a test of this script, while connected via remote desktop as I did … you will disconnect and wonder whether you did run the script and if yes, what happened to the machine on the other side of the “now black hole”.
Eventually the light turns on and you realise that you manually disabled remote desktop, which pulled the plug … having fun all day long :)
In terms of the status we are managing the usual project bumps, but are still looking forward to releasing guidance for VSTS 2010, before the product ships to ensure you can plan and evaluate proactively.
See you next time.