Skip to content

Instantly share code, notes, and snippets.

View JeffWouters's full-sized avatar

Jeff Wouters JeffWouters

View GitHub Profile
@JeffWouters
JeffWouters / gist:52ddc5809dd6962ae899e8ba112e1349
Created November 26, 2025 06:29
Azure - Scan for pinned certificates
<#
.SYNOPSIS
Scan an Azure subscription for resources using certificate pinning–related configurations.
.NOTES
Requires: Az PowerShell modules
#>
# Login if needed
if (-not (Get-AzContext)) {
Connect-AzAccount
$Users = Import-csv .\users.csv
#Maak een groep aan per afdeling
$Users.department | Select-Object -Unique | ForEach-Object {
New-LocalGroup -Name $_ -Description "Group for department $_"
}
#Breid de CSV uit met functie/rol per user
#Maak een groep aan per functie/rol
$Users.function | Select-Object -Unique | ForEach-Object {
New-LocalGroup -Name $_ -Description "Group for function $_"
<#
.SYNOPSIS
Create local users
.DESCRIPTION
Create local users based on input
.EXAMPLE
New-INGUser -FirstName Pietje -LastName Puk -Gender M -Department IT
.EXAMPLE
New-INGUser Pietje Puk -Gender M -Department IT
.EXAMPLE
@JeffWouters
JeffWouters / pipeline-infra.yml
Created May 17, 2023 11:32
pipeline-infra.yml
trigger:
- main
pool:
vmImage: ubuntu-latest
variables:
azureServiceConnection: 'AZ400-CZ'
steps:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"value": "westeurope"
},
"name": {
"value": "CZApp"
}
targetScope = 'subscription'
@description('Specifies the location for resources.')
param location string
param name string
resource rg 'Microsoft.Resources/resourceGroups@2022-09-01' = {
name: name
location: location
}
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- main
pool:
vmImage: ubuntu-latest
@JeffWouters
JeffWouters / Friducation
Created July 1, 2022 13:27
Friducation
<#
.SYNOPSIS
A function to create a user.
.DESCRIPTION
A function to create a user on the AzureAD.
.PARAMETER FirstName
Provide the first name of the user to be created.
.PARAMETER LastName
Provide the last name of the user to be created.
.EXAMPLE
Install-Module -Name PSScriptAnalyzer -Force
Get-Command -Module PSScriptAnalyzer
Invoke-ScriptAnalyzer -Path D:\PowerShell\script.ps1
Invoke-ScriptAnalyzer -Path D:\PowerShell\script.ps1 | Out-GridView
(1..10 | foreach {
measure-command {
D:\PowerShell\script.ps1
@JeffWouters
JeffWouters / Tips&Tricks
Created July 3, 2016 10:53
PowerShell Unbound - Tips 'n Tricks - 06/2016
#region Prep
$Files = Get-ChildItem d:\ -Recurse
#endregion Prep
#region Hex
0xfd
#endregion Hex
#region Location, location, location
Push-Location 'D:\Methos'