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:
3: # This script enables the remote desktop connectivity
5: # Author : VSTS Rangers
6: # Requires : PowerShell V1
8: # .\EnableRemoteDesktop.ps1
14: # ——————————————————————————————-
15: function EnableRemoteDesktop
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 $?)
21: New-ItemProperty -Path ‘HKLM:\System\CurrentControlSet\Control\Terminal Server’ -name “fDenyTSConnections” -Value 0 -PropertyType dword
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 $?)
27: New-ItemProperty -Path ‘HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp’ -name “UserAuthentication” -Value 0 -PropertyType dword
29: #enable firewall rule for remote desktop
30: Netsh advfirewall firewall set rule group=”Remote Desktop” new enable=yes
33: # -Main————————————————————————————–
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.