- Copy/download
get_cloud.pyto/usr/local/binof the Proxmox node - Change common variables inside the script
chmod +x /usr/local/bin/get_cloud.py- Copy and edit the
xxx.serviceandxxx.timerinto the folder/etc/systemd/system. Adjust the contents as appropriate (xxxcan 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-reloadsystemctl 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
| # Copyright 2025 James Riley | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| # | |
| # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
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" |
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) | |
| { |
NewerOlder