January 18, 2010

How to Delete a TFS Team Project

Filed under: TFS — Tags: , , , — Tim Lefler @ 2:26 pm

So how do you delete a Team Foundation Server (TFS) Team Project that is no longer needed. It is not immediately obvious, certainly there is no obvious way using the Team Explorer GUI.

The answer is to use the “tfsdeleteproject” command.

Usage: TfsDeleteProject [/q] [/force] </server:<server name>> <team project name>
 
Deletes the Team Project from Team Foundation.  To use this command, you must be
 a member of either the Team Foundation Server Administrators group or a member
of the Project Administrators group for the project you are deleting.  Use this
command with caution because after deleting the team project it cannot be recovered.
 
   [/q] - Do not prompt for confirmation.
   </server:<server name>> - The name of the Team Foundation server.
   [/force] - Continue even if some data cannot be deleted.
   <team project name> - The name of the project.  Use quotes if there are spaces in the name.

So to delete a project called “Tim2″ you would open up a visual studio command prompt on a machine with Team Explorer installed and type the following:

c:\Program Files\Microsoft Visual Studio 9.0\VC>tfsdeleteproject /server:tfsserver Tim2
 
Warning: Deleting a team project is an irrecoverable operation. All version cont
rol, work item tracking and Team Foundation build data will be destroyed from th
e system. The only way to recover this data is by restoring a stored backup of t
he databases. Are you sure you want to delete the team project and all of its da
ta (Y/N)?y
 
Deleting from Build ...
Done
Deleting from Work Item Tracking ...
Done
Deleting from Version Control ...
Done
Deleting Report Server files ...
Done
Deleting SharePoint site ...
Done
Deleting from Team Foundation Core ...
Done

How to Change the WSS Site for TFS

Filed under: TFS — Tags: , , — Tim Lefler @ 2:07 pm

I had to recently change the name of the SharePoint site that Team Foundation Server (TFS) pointed to for creation of the collaboration site.

On your new moss server you will still need the WSS Ext for SharePoint Installed and you will need to run the “tsconfigwss.exe to make shure SharEPoint is familiar with the location of the TFS report server.

To make TFS point to the new SharePoint site…..

TFS has a handy utility called “tfsadminutil” that allows you to change the URIs associated witht he TFS installation.

TFSAdminUtil ConfigureConnections [/View] [/proxy] [/ClientCertificate: (user|computer)] [/ATUri:<uri>] [/PublicATUri:<uri>] 
[/SharepointUri:<uri>] [/SharepointSitesUri:<uri>] [/SharepointAdminUri:<uri>] [/SharepointUnc:<unc>] [/TswaUri:<uri>]

(more…)

Argument Description
user Use with /clientcertificate option to specify to use the user certificate store.
computer Use with /clientcertificate option to specify it to use the computer certificate store.
URI Use to set the uniform resource indicator (URI) with the appropriate option.

January 15, 2010

TFS 2008 Email Alerts and the Event Receiver

Filed under: TFS — Tags: , , , — Tim Lefler @ 11:30 am

Team Foundation Server (TFS) is a collection of services including version control, work item tracking, and an EventService service. The EventService exposes a set of events that, when fired, can perform actions such as sending e-mail or making a SOAP-based Web service call.

Email alerts can easily be configured on a per project basis using Team Explorer. Once connected to the Team Server, you’ll be able to access the Team menu on the main menu bar. If you select the menu item “Project Alerts” Visual Studio will open the Project Alerts dialog, which allows you to create e-mail subscriptions for the major events associated with a particular project.

Email Alerts for a Partucular Project

TFS will format the body of the message HTML or plain.  Multiple Email addresses can be configured by separating them with a semi-colon.  Email formating is controlled XSLT transforms located on the TFS server in the “C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Services\v1.0\Transforms” directory.  It transforms the Event XML in to HTML or TEXT. (more…)

January 13, 2010

Using VS 2008 Team Foundation Server SourceControl API

Filed under: Development,TFS — Tags: , , , — Tim Lefler @ 1:33 pm

Wanted to build a Visual Studio Web Project that would allow me to select a Team Project from a drop-down box and then list all of the folders associated with the Project.  This will be used as a stepping stone to later add some check in notifications to Team Foundation Server to perform some specific action based on what folder the source member was checked into….

But for now it just lists the folders associated with the project.

So here is HTML associated with my example project:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
< %@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="TFSListFolders._Default" %>
 
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
 
        Select Team Project to Configure:
        <asp:dropdownlist ID="drpProjects" runat="server" AutoPostBack="True">
        </asp:dropdownlist>
        </div>
    <asp:listbox ID="lstFolders" runat="server" Height="193px" Width="805px">
    </asp:listbox>
    </form>
</body>
</html>

(more…)

January 12, 2010

What is SID History?

Filed under: Information Technology — Tags: , — Tim Lefler @ 4:55 pm

SID History is an Active Directory (AD) user account object attribute that facilitates the authorization process when you migrate Windows domains.  SID History helps in migrating active directory domains in which a both domain infrastructures exist in parallel. In such a scenario, newly created user accounts in the new domain often need to be able to access resources in the old domain. The main problem in these situations is that resources in the old domain are secured using ACLs that refer to old SIDs of user accounts defined in the old domain.

To resolve this problem, Microsoft provides the ClonePrincipal API used by tools like the Active Directory Migration Tool (ADMT).  When you create a new account, the API can add the old account’s SID to the SID History attribute of the new account.  As a result, when the user logs on to the new domain by using his or her new account, the access token will refer to the new SID and to the old SID. The user can then seamlessly access resources secured with the old SID hosted in the old domain.

There are a number of other applications other than ADMT that can help ease some of the migration headache.  One of note is Quest’s Migration Manager.  Our enterprise group sings the praises of this product.

How to turn off the “MySite” and “MyLinks” in MOSS 2007

Filed under: Sharepoint — Tags: , , , — Tim Lefler @ 4:08 pm

So if you don’t want to implement MySites and its dependent MyLinks, how do you turn it off?

Below are the steps to remove the two links:

  1. Log into Central Administration.
  2. Click on the link for Shared Services Administration
    –If you have more than one SSP, select the one that is running the MySites functionality
  3. In the “User Profiles and My Sites” group, click on the “Personalization services permissions” link.
  4. Select the group you want to limit the functionality for.  More than likely you will just have NTAuthority\Authenticated Users.
  5. On the “Modify Permissions: Shared Service Rights” page
    –To disable MySites uncheck “Create Personal Site”
    –To disable MyLinks uncheck “Use Personal Features”

January 4, 2010

Reading Registry using VB.Net

Filed under: General Development — Tags: , — Tim Lefler @ 4:46 pm

I quick code snippet on how to read the registry using VB.Net

Imports Microsoft.Win32
 
Public Class Somethiing
      Public Sub New() 
           Dim txtRegistryValue as String
           txtRegistryValue = Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Company\SomeKey", "RegistryValueName", Nothing)
      End Sub
End Class

Retrieves the value associated with the specified name, in the specified registry key. If the name is not found in the specified key, returns a default value that you provide, or nullNothingnullptra null reference (Nothing in Visual Basic) if the specified key does not exist.
Parameters

keyName
Type: System..::.String
The full registry path of the key, beginning with a valid registry root, such as “HKEY_CURRENT_USER”.

valueName
Type: System..::.String
The name of the name/value pair.

defaultValue
Type: System..::.Object
The value to return if valueName does not exist.

Return Value
Type: System..::.Object
nullNothingnullptra null reference (Nothing in Visual Basic) if the subkey specified by keyName does not exist; otherwise, the value associated with valueName, or defaultValue if valueName is not found.

References:
http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.getvalue.aspx

Powered by WordPress