Skip to content

Instantly share code, notes, and snippets.

@grangerx
grangerx / Remove_VMwareTools.ps1
Created March 1, 2024 20:45 — forked from broestls/Remove_VMwareTools.ps1
Force removal of VMware Tools, Program Files, and Windows Services
# This script will manually rip out all VMware Tools registry entries and files for Windows 2008-2019
# Tested for 2019, 2016, and probably works on 2012 R2 after the 2016 fixes.
# This function pulls out the common ID used for most of the VMware registry entries along with the ID
# associated with the MSI for VMware Tools.
function Get-VMwareToolsInstallerID {
foreach ($item in $(Get-ChildItem Registry::HKEY_CLASSES_ROOT\Installer\Products)) {
If ($item.GetValue('ProductName') -eq 'VMware Tools') {
return @{
reg_id = $item.PSChildName;
@grangerx
grangerx / pihole-centos8-podman.md
Created January 25, 2023 21:16 — forked from janfrode/pihole-centos8-podman.md
Pi-hole in podman in Centos8

These were the steps I needed to perform to run pi-hole in a podman container on Centos8/RHEL8:

First I got it running in podman with the environment I needed (information on additional settings is available from https://hub.docker.com/r/pihole/pihole):

# podman run -d -p 53:53/udp -p 80:80/tcp -e DNS1=1.1.1.1 -e DNS2=8.8.8.8 --name pi-hole -e WEBPASSWORD=admin-password-here  docker.io/pihole/pihole

@grangerx
grangerx / create-bootable-CentOS-USB.sh
Last active March 1, 2022 19:51 — forked from tfherbert/create-bootable-CentOS-USB.sh
create-bootable-CentOS-USB.sh
#/bin/bash
# build a small bootable USB from CentOS ISO.
#
# Run on Fedora or CentOS
#
#
# Build a bootable USB image to automatically install CentOS8 on
# a small X86_64 box such as a nuc variant.
# Uses a custom kickstart derived from installed system which can be
@grangerx
grangerx / vm-rename
Created January 14, 2022 19:40 — forked from raarts/vm-rename
Script to rename a virtual machine in ESXi 6
#!/bin/sh
#
# shell script to rename a virtual machine in ESXi
#set -x
if [ $# -ne 4 ]; then
echo "Usage: $0 VOLNAME DIRNAME OLDNAME NEWNAME
where VOLNAME is the volume name, e.g. datastore1,
DIRNAME is the the name of the directory of the virtual machine,