0

I was able to run the following commands in Powershell with PowerTools and TFS. What are the equivalent Powershell commands for Process Template Editor and DevOps please? Or is there any other way of doing this in Powershell with DevOps Server 2020?

add-pssnapin Microsoft.TeamFoundation.PowerShell

Get-TfsServer -name $tfsServer | out-null

# Retrieve the TFS item properties
$x = Get-TfsItemProperty -Item $itemFilePath

# Does the item exist in TFS 
if ($x.IsInWorkspace -ne $null)

# Is the item checked out?      
if ($x.LockOwner -ne $null) 

# Is the item checked out to someone else?
if ($x.LockOwner -ne $myUser)

# Add the item to TFS
Add-TfsPendingChange -Add -Item $itemFilePath | out-null

# File exists and is not checked out, Check it out 
Add-TfsPendingChange -Edit -Item $itemFilePath | out-null

# Check in the file 
$x = New-TfsChangeset -Item $itemFilePath -Comment $itemComment
Fletch
  • 367
  • 1
  • 5
  • 20

0 Answers0