Skip to content

Instantly share code, notes, and snippets.

View wilfriedwoivre's full-sized avatar
☁️

Wilfried Woivre wilfriedwoivre

☁️
View GitHub Profile
@wilfriedwoivre
wilfriedwoivre / moverecursive.ps1
Created November 5, 2025 14:04
MoveDirectoryRecursive
function Move-ItemsRecursively {
<#
.SYNOPSIS
Moves files and folders recursively, creating destination folders as needed.
.DESCRIPTION
This function moves all files and folders from a source path to a destination path,
maintaining the directory structure. It creates any necessary nested folders at the destination.
.PARAMETER SourcePath
[
{
"src": "^(https:\\/\\/learn\\.microsoft\\.com)\\/fr-fr\\/(.*)",
"dst": "$1/en-us/$2",
"isEnabled": true,
"isRegex": true
},
{
"src": "^(https:\\/\\/portal\\.azure\\.com)\\/(.*)",
"dst": "https://preview.portal.azure.com/$2",
@wilfriedwoivre
wilfriedwoivre / openssl
Created May 2, 2025 08:32
openssl self signed certificate
#!/bin/bash
# Script to create a self-signed certificate for test.org
# Set variables
DOMAIN="test.org"
DAYS_VALID=365
OUTPUT_DIR="./certs"
# Create output directory if it doesn't exist
mkdir -p $OUTPUT_DIR
@wilfriedwoivre
wilfriedwoivre / azuredeploy-hub.json
Created October 8, 2020 13:18
azure-firewall-cognitive-l7
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"deployLocation": {
"type": "string"
}
},
"functions": [
],
@wilfriedwoivre
wilfriedwoivre / azuredeploy.json
Last active October 2, 2020 08:45
azure-vm-sep-update
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUserName": {
"type": "string"
},
"adminPassword": {
"type": "securestring"
}
@wilfriedwoivre
wilfriedwoivre / azurepolicy-autoshutdown.json
Created September 3, 2019 17:25
Azure Policy Auto Shutdown
{
"mode": "Indexed",
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Compute/virtualMachines"
},
{