This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install WinGet | |
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901 | |
$hasPackageManager = Get-Command winget -ErrorAction SilentlyContinue | |
[version]$version = if ($hasPackageManager) { | |
(winget --version).trim('v') | |
} | |
else { | |
'0.0.0' | |
} | |
$releasesUrl = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
format = """ | |
$os\ | |
$username\ | |
$c\ | |
$dotnet\ | |
$elixir\ | |
$erlang\ | |
$java\ | |
$kotlin\ | |
$lua\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Assigns Data Collection Rules to Azure VMs and Azure Arc servers. | |
.DESCRIPTION | |
This script connects to Azure, retrieves all Windows Azure VMs and Azure Arc | |
servers from specified subscriptions, and applies Data Collection Rules to | |
them. It is intended to streamline the setup of monitoring across both Azure | |
VM and Azure Arc environments by automating the association of DCRs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-IamWorkflow { | |
<# | |
.SYNOPSIS | |
Invokes one or more worker scripts in parallel using a runspace pool, passing in items and a shared thread-safe state. | |
.DESCRIPTION | |
The Invoke-IamWorkflow function takes an array of input objects and an array of worker script names. | |
It creates a shared ConcurrentDictionary to store global or aggregated state in a thread-safe manner. | |
Each worker script is executed in its own runspace, When all worker scripts have finished executing, | |
the function outputs the per-run results as well as the final shared state. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone --bare [email protected]:jpbruckler/dotfiles.git $HOME/.dotfiles | |
function config { | |
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@ | |
} | |
mkdir -p .config-backup | |
config checkout | |
if [ $? = 0 ]; then | |
echo "Checked out config."; | |
else | |
echo "Backing up pre-existing dot files."; |
OlderNewer