- Copy/download
get_cloud.py
to/usr/local/bin
of the Proxmox node - Change common variables inside the script
chmod +x /usr/local/bin/get_cloud.py
- Copy and edit the
xxx.service
andxxx.timer
into the folder/etc/systemd/system
. Adjust the contents as appropriate (xxx
can be any string, provided that the names of the SystemD unit (xxx.service
) and the timer (xxx.timer
) is the same. The above files are provided as an example only) systemctl daemon-reload
systemctl enable xxx.timer && systemctl start xxx.timer
- To download and import the cloud image right away, run
systemctl start xxx.service
. You don't have to wait for the service to finish and can back out immediately by pressingCtrl+C
. - To view the output of the service run
journalctl -u xxx.service
This file contains hidden or 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
export PBS_HOST="10.69.4.20" | |
export PBS_PORT="8007" | |
export PBS_USERNAME="root@pam" | |
export PBS_PASSWORD="totallymyrealpassword" | |
export PBS_DATASTORE="tank" | |
export PBS_NAMESPACE="backups" | |
export PBS_FINGERPRINT="fi:ng:er:pr:in:ts:ar:en:ts:ec:re:tb:ut:im:ch:an:gi:ng:it:an:yw:ay" | |
export PBS_REPOSITORY="${PBS_USERNAME}@${PBS_HOST}:${PBS_PORT}:${PBS_DATASTORE}" |
This file contains hidden or 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 Get-PSModuleUpdates { | |
param | |
( | |
[Parameter(ValueFromPipelineByPropertyName, Mandatory)] | |
[string]$Name, | |
[Parameter(ValueFromPipelineByPropertyName, Mandatory)] | |
[version]$Version, | |
[Parameter(ValueFromPipelineByPropertyName)] |
This file contains hidden or 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
# Copyright: (c) 2024, Jordan Borean (@jborean93) <[email protected]> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Function New-ScheduledTaskSession { | |
<# | |
.SYNOPSIS | |
Creates a PSSession for a process running as a scheduled task. | |
.DESCRIPTION | |
Creates a PSSession that can be used to run code inside a scheduled task |
This file contains hidden or 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
# Long command with many parameters all on one line | |
Send-MailMessage -From "[email protected]" -To "[email protected]" -Subject "Test Email" -Body "This is a test email." -SmtpServer "smtp.example.com" -Port 587 -UseSsl -Credential (Get-Credential) -Attachments "C:\path\to\file.txt" -Priority High -DeliveryNotificationOption OnSuccess, OnFailure | |
# Equivalent command using splatting for readability | |
$mailParams = @{ | |
From = "[email protected]" | |
To = "[email protected]" | |
Subject = "Test Email" | |
Body = "This is a test email." | |
SmtpServer = "smtp.example.com" |
This is me documenting my journey moving my Homelab from a Qnap NAS and a Single host Proxmox server to a Hyper-converged multi-node Proxmox Cluster.
The reason to document it here is twofold:
- Information often it scattered 'all over the place', but never 100% applicable to the setup I have.
- To remember 'what the fuck' did I do some months ago.
- Writing it for 'a public' forces me to think it all through again and make sure it's correct.
It's written 'first to scratch my own itch' but hopefully it benefits others too, or even better, that others improve upon my implementations. Feel free to comment or share improvements and insights!
aka what i did to get from nothing to done.
note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV
This file contains hidden or 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
#Requires -Modules DynamicTitle | |
$commandStartJob = Start-DTJobCommandPreExecutionCallback -ScriptBlock { | |
param($command) | |
(Get-Date), $command | |
} | |
$promptJob = Start-DTJobPromptCallback -ScriptBlock { | |
(Get-Date) | |
} |
This file contains hidden or 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
# Simple script to check drivers in C:\windows\system32\drivers against the loldrivers list | |
# Author: Oddvar Moe - @oddvar.moe | |
$drivers = get-childitem -Path c:\windows\system32\drivers | |
$web_client = new-object system.net.webclient | |
$loldrivers = $web_client.DownloadString(" https://www.loldrivers.io/api/drivers.json") | ConvertFrom-Json | |
Write-output("Checking {0} drivers in C:\windows\system32\drivers against loldrivers.io json file" -f $drivers.Count) | |
foreach ($lol in $loldrivers.KnownVulnerableSamples) | |
{ |
This file contains hidden or 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 Scan-LOLDrivers { | |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$path | |
) | |
Add-Type -TypeDefinition @" | |
using System; | |
using System.Security.Cryptography; | |
using System.Security.Cryptography.X509Certificates; |
NewerOlder