Skip to content

Instantly share code, notes, and snippets.

View jschlackman's full-sized avatar

James Schlackman jschlackman

View GitHub Profile
@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.
@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.