TL;DR Be aware of security implications that come with third-party setup tools. Compare Debian-backed approach with innocuously looking scripts and learn what actually makes the difference.
ORIGINAL POST A neater Proxmox no subscription setup
TL;DR Be aware of security implications that come with third-party setup tools. Compare Debian-backed approach with innocuously looking scripts and learn what actually makes the difference.
ORIGINAL POST A neater Proxmox no subscription setup
$tempPath = [System.IO.Path]::GetTempPath() + [System.Guid]::NewGuid().ToString() | |
# ADK Download - https://www.microsoft.com/en-us/download/confirmation.aspx?id=39982 | |
# You only need to install the deployment tools | |
$oscdimgPath = "C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" | |
# Download qemu-img from here: http://www.cloudbase.it/qemu-img-windows/ | |
$qemuImgPath = "E:\backbonev2\lib\bin\qemu-img-win-x64-2_3_0\qemu-img.exe" | |
# Update this to the release of Ubuntu that you want |
# Copyright: (c) 2020, Jordan Borean (@jborean93) <[email protected]> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Function Write-WUAError { | |
<# | |
.SYNOPSIS | |
Convert raw HRESULT codes to a human readable error. | |
.PARAMETER Exception | |
The COMException that the error code is from. |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory = $true)] | |
[string] $Publisher, | |
[Parameter(Mandatory = $true)] | |
[string] $ExtensionName, | |
[Parameter(Mandatory = $true)] |
<# | |
.SYNOPSIS | |
Installs PowerShell scripts as Windows Services. | |
.DESCRIPTION | |
Installs or removes PowerShell script services. | |
When installing, any additional command line arguments besides the mandatory ones are supplied as arguments to the script you are installing, and credentials for the service will be prompted for. | |
The service will be installed for automatic start, however the initial state is 'Stopped' | |
This tool will additionally pass the switch -Service to the target script which it should implement to know it is running as a service. |
$dllBytes = [System.IO.File]::ReadAllBytes( "C:\NLog.dll") | |
[System.Reflection.Assembly]::Load($dllBytes) | |
# Create object that we will use to send customized info | |
# This is to be used if you use ${event-context:item=MyValue} in your config ! | |
$cos = new-object NLog.LogEventInfo | |
$cos.Level = [NLog.LogLevel]::Info | |
$cos.Message = 'executing something really cool' | |
# Load XML configuration and use it |