This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Ensure you create a PAT, following the instructions here: https://dev.to/omiossec/getting-started-with-azure-devops-api-with-powershell-59nn | |
#Additional Credit: https://blog.rsuter.com/script-to-clone-all-git-repositories-from-your-vsts-collection/ | |
#I suggeste executing from C:/Projects. This script will create a folder for each Team Project/Client with repos within each. | |
#Finally note that git clone operations count as "Errors" in powershell, and appear red. It's more work than is worth it to change it. | |
param( | |
[string] $email = $(Throw "--Email is required."), #required parameter | |
[string] $pat = $(Throw "--PAT is Required"), #required parameter | |
[string] $url = $(Throw "--Collection URL is required.") #required parameter pointing to the default collection, URL is generally https://{tenant}.visualstudio.com/defaultcollection | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Hylaine.Shared.Extensions | |
{ | |
public static class HttpResponseExtensions | |
{ |