Skip to content

Instantly share code, notes, and snippets.

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//PowerShell//Tour de France 2026//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Tour de France 2026
X-WR-CALDESC:Complete Tour de France 2026 schedule with all 21 stages
BEGIN:VEVENT
UID:letour2026-stage1@powershell.local
DTSTART:20260704T100000Z
######################################################################
## FUN WITH FACTORIALS (v2)
## Thanks to
## - James (github.com/StartAutomating) for pointing out $INPUT
## - Simon (github.com/simonWahlin) for the class snippet
## - Andree (github.com/trackd) for the "Runtime2" measurement tweak
## https://bsky.app/profile/thorsten.butz.io/post/3lbmsswysd22d
######################################################################
param ($n = 1000)
##########################################
## Install AppInstaller/WinGet on WS 2022
##########################################
## Install prerequisite: VCLibs
Invoke-WebRequest -UseBasicParsing -Uri 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx' -OutFile 'Microsoft.VCLibs.x64.14.00.Desktop.appx'
Add-AppxPackage -Path 'Microsoft.VCLibs.x64.14.00.Desktop.appx'
Add-AppxProvisionedPackage -Online -PackagePath 'Microsoft.VCLibs.x64.14.00.Desktop.appx' -SkipLicense
## Install prerequisite: UIXaml (via nuget.org)
@thorstenbutz
thorstenbutz / Get-PSConfEU2022Session.ps1
Last active July 23, 2022 16:48
Get-PSConfEU2022Session.ps1
#Requires -Version 5.0
$baseUri = 'https://psconfeu2022.blob.core.windows.net/video/'
$csvfile = 'psconfeu22.csv'
$selectedItems = Invoke-RestMethod -UseBasicParsing -uri "https://psconfeu2022.blob.core.windows.net/video/$csvfile" | ConvertFrom-Csv | Out-GridView -PassThru
$selectedItems
## Is current directory writable?
try {
New-Item -Path "testfile$($(Get-Date).ticks).txt" -ErrorAction Stop | Remove-Item
@thorstenbutz
thorstenbutz / wordlebook.psd1
Last active January 11, 2022 16:18
wordlebook
words
aback
abase
abate
abaya
abbey
abbot
abets
abhor
abide
@thorstenbutz
thorstenbutz / SetupPS7_Raspbian.sh
Created November 29, 2020 19:45
Setup latest PowerShell on Raspbian
############################################################################################################################
# Setup latest PowerShell on Raspbian
# This is my version of:
# https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux#installation---raspbian
############################################################################################################################
# Create directory
mkdir -p /opt/powershell
# Install libunwind8 and libssl1.0 while not installing libssl1.0-dev
@thorstenbutz
thorstenbutz / psconf2018agenda.ps1
Last active April 5, 2018 17:06
PSConf.eu 2018 agenda builder
#########################
# PSConf agenda building
#########################
# as PDF:
# https://github.com/PowerShellConferenceEU/2018/blob/master/Agenda_psconfeu_2018.pdf
# as PSdrive:
# http://www.powershellmagazine.com/2018/04/03/psconfeu-agenda-as-a-powershell-drive-using-ships/
@thorstenbutz
thorstenbutz / Enable-ExplorerRunAs_v2.ps1
Last active January 23, 2018 10:09
POC script to impersonate as TrustedInstaller.
#Requires -RunAsAdministrator
# Disclaimer: this is just a Proof-Of-Concept snippet, not a properly written script.
# Read this:
# http://www.thorsten-butz.de/run-explorer-as-admin/
# https://tyranidslair.blogspot.de/2017/08/the-art-of-becoming-trustedinstaller.html
param ([switch]$ResetToDefault)
$ResetToDefault
And finally, I am proving ownership of the github account by posting this as a gist.
### My publicly-auditable identity:
https://keybase.io/thorstenbutz
### From the command line:
Consider the [keybase command line program](https://keybase.io/docs/command_line).
```
And finally, I am proving ownership of the github account by posting this as a gist.
### My publicly-auditable identity:
https://keybase.io/thorstenbutz
### From the command line: