Thank you for your understanding.
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
# Define Helper Functions | |
function Get-Sha256Hash ($StringToHash) { | |
$hasher = [System.Security.Cryptography.SHA256]::Create() | |
$Hash = ([BitConverter]::ToString($hasher.ComputeHash([Text.Encoding]::UTF8.GetBytes($StringToHash))) -replace '-','').ToLower() | |
Write-Output $Hash | |
} | |
function ConvertTo-SortedDictionary($HashTable) { | |
$SortedDictionary = New-Object 'System.Collections.Generic.SortedDictionary[string, string]' | |
foreach ($Key in $HashTable.Keys) { |
The handy script below (x4-debug.bat) can be used as a shortcut to start x4 in debug mode. You get:
- All debug messages turned on
- All debug logs sent to a timestamped file, so you dont lose anything
Copy paste the code in the file below, then update the value for X4_EXE_PATH
- change it to wherever X4.exe is located.
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
#!/bin/sh | |
# | |
# Generates PDF from Publitas images (online folder service) | |
# Stores generated PDF and JSON (which may contains links). | |
# | |
# Requirements: | |
# - wget https://www.gnu.org/software/wget/ | |
# - jq https://stedolan.github.io/jq/ | |
# - imagemagick https://www.imagemagick.org/ | |
# |
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
# this function grabs the iso image from the user supplied http location. | |
function get-isoimage{ | |
[CmdletBinding()] | |
param( | |
$uri, | |
$workingfolder | |
) | |
begin{ | |
$file_name = $uri -replace "http://[\s\S]+\/([\s\S]+\.iso)$",'$1' | |
$out_file = Join-Path $workingfolder -ChildPath $file_name |
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
# Powershell script to discover VMDK files that are not referenced in any VM's VMX file. | |
# Warning - I've heard reports that this doesn't work on some versions of ESXi and have no had time to troubleshoot/test it. | |
# Also detects VMDKs from machines that need snapshot consolidation (from differentials that exist but are not part of the tree). | |
# Author: HJA van Bokhoven | |
# Modifications: LucD | |
function LoadSnapin{ | |
param($PSSnapinName) | |
if (!(Get-PSSnapin | where {$_.Name -eq $PSSnapinName})){ | |
Add-pssnapin -name $PSSnapinName |