This project is read-only.

Get-LogTFS

Introduction

The Get-LogTFS cmdlet enables to save events in an object collection (Adding/Removing file, Check-in...)

Parameters

Name Description Example
-OnLog Enables to start logging -OnLog $true

log sample with Set-Merge command

Windows PowerShell V2 (Community Technology Preview - Features Subject to Change)
Copyright (C) 2008 Microsoft Corporation. All rights reserved.

Utilisateur courant : Administrateur


PSTFS > $tfs = Get-TFS colmar
PSTFS > $log = Get-LogTFS -OnLog $true
PSTFS >
PSTFS > Set-Merge -tfs $tfs -ProjectName DemoAuto -Source $/DemoAuto/Dev -Target $/DemoAuto/IntR2 -Description Merge -Re
cursionType Full -MergeOptions none
Number conflicts : 0
Number failures : 0
Number operations : 225
Number warnings : 0
PSTFS > $log | ft

Date                          Owner                         msg                           e
----                          -----                         ---                           -
16/02/2009 08:23:46           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:23:46           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:23:46           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:23:46           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:23:46           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:23:46           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:23:46           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:24:13           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:24:13           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:24:13           COLMAR\Administrateur         Getting: c:\temp\MergeTFSP... Microsoft.TeamFoundation.V...
16/02/2009 08:24:57           COLMAR\Administrateur         Number conflicts : 0
16/02/2009 08:24:57           COLMAR\Administrateur         Number failures : 0
16/02/2009 08:24:57           COLMAR\Administrateur         Number operations : 225
16/02/2009 08:24:57           COLMAR\Administrateur         Number warnings : 0
16/02/2009 08:25:02           COLMAR\Administrateur         Your current pending changes:
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur           path: c:\temp\MergeTFSPs...
16/02/2009 08:25:02           COLMAR\Administrateur         BeforeCheckinPendingChange... Microsoft.TeamFoundation.V...
16/02/2009 08:25:02           COLMAR\Administrateur         BeforeCheckinPendingChange... Microsoft.TeamFoundation.V...
16/02/2009 08:25:02           COLMAR\Administrateur         BeforeCheckinPendingChange... Microsoft.TeamFoundation.V...
16/02/2009 08:25:02           COLMAR\Administrateur         BeforeCheckinPendingChange... Microsoft.TeamFoundation.V...
16/02/2009 08:27:49           COLMAR\Administrateur         Checked in changeset 131
16/02/2009 08:27:54           COLMAR\Administrateur         Set-Merge is end

Example to clean the log

PSTFS > $log.Clear()

log example with the Set-Merge command

Windows PowerShell V2 (Community Technology Preview - Features Subject to Change)
Copyright (C) 2008 Microsoft Corporation. All rights reserved.

Utilisateur courant : Administrateur


PSTFS > $tfs = Get-TFS colmar
PSTFS > $log = Get-LogTFS -onlog $true
PSTFS > Remove-Files -tfs $tfs -source $/mydemo/dev -destroyflags none
PSTFS > $log

Date                          Owner                         msg                           e
----                          -----                         ---                           -
28/01/2009 22:49:05           COLMAR\Administrateur         Delete : $/MyDemo/dev/mondev
28/01/2009 22:49:05           COLMAR\Administrateur         Delete : $/MyDemo/dev/mond...
28/01/2009 22:49:05           COLMAR\Administrateur         Delete : $/MyDemo/dev/MyHo...
28/01/2009 22:49:05           COLMAR\Administrateur         Delete : $/MyDemo/dev/Temp...
28/01/2009 22:49:05           COLMAR\Administrateur         Delete : $/MyDemo/dev/WebP...
28/01/2009 22:49:05           COLMAR\Administrateur         Remove-Files is end

Last edited Nov 8, 2009 at 10:47 AM by pc152, version 2

Comments

No comments yet.