Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Update package lists
echo "Updating package lists..."
sudo apt-get update
# Install InfluxDB
echo "Installing InfluxDB..."
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/os-release
@blandco
blandco / get-adusers.ps1
Created March 22, 2021 19:22
Read users from a file and get directory properties for each.
$users = Get-Content .\adusers.txt
foreach ($user in $users) {
Get-ADUser -Filter 'mail -eq $user' -Properties mail,name,department,manager | Export-Csv -Path .\output.csv -NoTypeInformation -Append -Force
}
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"scriptURL": {
"type": "string"
},
"adminUsername": {
"type": "string"
},
# // Bootstrap choco
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# // Blindly accept legal terms
choco feature enable -n allowGlobalConfirmation
# // Do work
choco install googlechrome

Keybase proof

I hereby claim:

  • I am blandco on github.
  • I am blandco (https://keybase.io/blandco) on keybase.
  • I have a public key whose fingerprint is B6F5 9FED DBCD 00F7 8F9E ADFB A6C8 4EC9 3D1A 4841

To claim this, I am signing this object: