Skip to content

Instantly share code, notes, and snippets.

param (
[string] $PAT=$null,
[string] $organization,
[string] $repository,
[string] $branchname,
[string] $teamProject,
[bool] $isInBuild=$true
)
function New-AzDoAuthenticationToken {
@renevanosnabrugge
renevanosnabrugge / demo.md
Created July 10, 2023 08:51
Demo For training

Heading 1

@renevanosnabrugge
renevanosnabrugge / MyUserManual.md
Last active January 14, 2021 21:15
User manual for working with me

User manual for working with me*

Conditions I like to work in

  • In creative mode, a place with lots of whiteboards. I tend to be drawing when I talk
  • In productive mode, when work needs to be done, quiet space,or you'll find me with my noise cancelling headphones
  • A space with enough (sun)light
  • Good coffee and tea. Spoiled... yes, but I just don't like the "cheap" machine stuff
  • A place where you can have a chat and talk about stuff that is non-work related
  • Working from home works well for me since I have all the space and equipment I need, and I can balance it with family life.
# Login with you Azure account that has rights to create SPN's
$sqladminSPN = "blog-sql-admin"
az login
az ad app create --display-name $sqladminSPN
#Setting up SQL
$resourcegroup = "rg-blog-sql"
$sqlservername = "blog-sqlsrv-rvo"
$location = "westeurope"
$databasename="tododb"
pool:
vmImage: 'ubuntu-latest'
trigger:
- master
- development
steps:
- task: PowerShell@2
displayName: Determine source branch

HandsOn Dutch Microsoft ALM Group 13/9/2018 - The Shift to Rugged DevOps

There are many things to explore, but there is only so little time.

Pick and choose any of the assignments below, or explorer on your own.

As a nice repo to work with, you can use this one https://github.com/XpiritBV/GDBC2018-GDBCWebsite

Shift left security

@renevanosnabrugge
renevanosnabrugge / BranchPolicies.http
Last active October 31, 2018 15:45
This collection of Gists contain all kinds of snippets to get information from the VSTS Rest API, that is not easily found in the API
#Using the great extension in VS Code https://marketplace.visualstudio.com/items?itemName=humao.rest-client
#use the gist GetBasicAuthToken.ps1 to get a valid token from a PAT
@collectionurl=https://account.visualstudio.com
@token=Base64EncryptedPAT e.g. Basic ONOTAVALIDTOKEN="
###
# Get all Available Branch Policies in the project
# --> value.id contains branch policy type id
GET {{collectionurl}}/_apis/projects/?api-version=1.0
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
cinst curl
cinst winrar
$password = ConvertTo-SecureString 'PAT' -AsPlainText -Force
$vstsCredential = New-Object System.Management.Automation.PSCredential 'vstsuseraccount-email', $password
Find-Module -Name roadtoalmUtils -Repository VSTSGallery -Credential $vstsCredential
install-Module -Name roadtoalmUtils -Repository VSTSGallery -Credential $vstsCredential
Get-Module -ListAvailable -Name roadtoalmUtils