Skip to content

Instantly share code, notes, and snippets.

View SebastianSchuetze's full-sized avatar
🎈
Focusing

Sebastian Schütze SebastianSchuetze

🎈
Focusing
View GitHub Profile
@SebastianSchuetze
SebastianSchuetze / Create-RandomFiles.ps1
Created March 9, 2019 13:39
Creates random files. It allows you to either choose the summary size of all files created. Or you can choose the number of files to be created and set the random minimum and maximum file size per file.
Function Create-RandomFiles{
<#
.SYNOPSIS
Generates a number of dumb files for a specific size.
.DESCRIPTION
Generates a defined number of files until reaching a maximum size.
This script is based on the following one: https://gist.github.com/Stephanevg/aa4f0ad50b9762b241bbed6d75f7d69d
.PARAMETER Totalsize
@SebastianSchuetze
SebastianSchuetze / Get-AzureDevOpsBuildTimelines.ps1
Created March 13, 2019 20:44
Gets the timeline of given build definition Ids for a project and exports them into a CSV file.
#In this script I expect that the user is already logged in into Azure DevOps with the VSTeam module
$projectName = "Pipeline Artifacts vs Build Artifacts"
$buildDefinitionIds = @(15,16,17,19)
$csvStatsFilePath = "C:\temp\BuildStats.csv"
#function to convert the flat timeline logs to a parent child tree, since the timeline has
#pipeline, phases and tasks which follow a hierarchy
Function ConvertTo-TreeArray($flatArray,$parentKey,$childKey){