Skip to content

Instantly share code, notes, and snippets.

View jschlackman's full-sized avatar

James Schlackman jschlackman

View GitHub Profile
@jschlackman
jschlackman / Remove_VMwareTools.ps1
Last active September 23, 2025 23: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;
@jschlackman
jschlackman / Save-Download.ps1
Created May 18, 2022 16:14 — forked from MattHodge/Save-Download.ps1
Save-Download.ps1
function Save-Download {
<#
.SYNOPSIS
Given either the result of WebResponseObject or a Uri, will download the file to disk without having to specify a name.
.DESCRIPTION
Given either the result of WebResponseObject or a Uri, will download the file to disk without having to specify a name.
.PARAMETER WebResponse
A WebResponseObject from running an Invoke-WebRequest on a file to download.
.PARAMETER Uri
Uri of a file to download in lieu of supplying a WebResponseObject.
@jschlackman
jschlackman / Disable-AutomaticallyDetectSettings.ps1
Last active September 5, 2018 20:18 — forked from ReubenBond/Disable-AutomaticallyDetectSettings.ps1
Disable 'Automatically detect settings' in Internet Explorer's proxy settings dialog.
# Disable 'Automatically detect proxy settings' in Internet Explorer.
# Read connection settings from Internet Explorer.
$regKeyPath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\"
$conSet = $(Get-ItemProperty $regKeyPath).DefaultConnectionSettings
# Index into DefaultConnectionSettings where the relevant flag resides.
$flagIndex = 8
# Bit inside the relevant flag which indicates whether or not to enable automatically detect proxy settings.