Skip to content

Instantly share code, notes, and snippets.

View wise-io's full-sized avatar
🏠
Working from home

Aaron Stevenson wise-io

🏠
Working from home
View GitHub Profile
@wise-io
wise-io / UpdateZeroTier.ps1
Last active October 18, 2022 16:08
Updates ZeroTier to Latest Version
<#
.SYNOPSIS
Updates ZeroTier
.DESCRIPTION
Install latest version of ZeroTier if ZeroTier is already installed.
.EXAMPLE
./UpdateZeroTier.ps1
./UpdateZeroTier.ps1 -Headless
.NOTES
A UAC prompt may appear during install if -Headless is not used.
@wise-io
wise-io / RemoveWebroot.ps1
Created April 25, 2022 19:10
Webroot Removal Script
# Removes Webroot SecureAnywhere by force
# Run the script once, reboot, then run again
# Webroot SecureAnywhere registry keys
$RegKeys = @(
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\WRUNINST",
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\WRUNINST",
"HKLM:\SOFTWARE\WOW6432Node\WRData",
"HKLM:\SOFTWARE\WOW6432Node\WRCore",
"HKLM:\SOFTWARE\WOW6432Node\WRMIDData",
@wise-io
wise-io / RemoveZeroTier.ps1
Last active April 22, 2024 13:14
PowerShell script to uninstall ZeroTier One silently
# Removes ZeroTier One
$Paths = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
$ZeroTierOne = Get-ChildItem -Path $Paths | Get-ItemProperty | Where-Object { $_.DisplayName -like 'ZeroTier One' } | Select-Object
$VirtualNetworkPort = Get-ChildItem -Path $Paths | Get-ItemProperty | Where-Object { $_.DisplayName -like 'ZeroTier One Virtual Network Port' } | Select-Object
if ($ZeroTierOne) {
Write-Output 'Uninstalling ZeroTier One...'
foreach ($Ver in $ZeroTierOne) {
$Uninst = $Ver.UninstallString
cmd /c $Uninst /qn
@wise-io
wise-io / InstallAdobeAcrobat.ps1
Created March 28, 2022 18:28
PowerShell script to silently install Adobe Acrobat DC
# Installs Adobe Acrobat DC
param (
[ValidateScript({
if ([System.IO.Path]::GetExtension($_) -eq '.zip') { $true }
else { throw "`nThe Path parameter should be an accessible file path to the zip archive (.zip) containing the Adobe Acrobat installation files. Download link: https://helpx.adobe.com/acrobat/kb/acrobat-dc-downloads.html" }
})]
[System.IO.FileInfo]$Path # Optional local path to setup archive.
)
$Archive = "$env:temp\AdobeAcrobat.zip"
@wise-io
wise-io / SetNetworkCategory.ps1
Last active May 30, 2022 11:25
PowerShell script to set the network category (type) to Public or Private.
# Sets current network category (type) to Public or Private.
# Should be run with Administrator privileges.
param (
[Parameter (Mandatory = $true)]
[ValidateSet('Public', 'Private', IgnoreCase)]
[string]$Category # Desired Network Category
)
# Format parameter
@wise-io
wise-io / InstallZeroTier.ps1
Last active April 22, 2024 09:14
Installs Latest ZeroTier One Client
<#
.SYNOPSIS
Installs ZeroTier
.DESCRIPTION
Install ZeroTier and join/configure ZeroTier network
.EXAMPLE
./ios-InstallZeroTier.ps1
.NOTES
This script will install PowerShell 7 if it is not present.
A UAC prompt will appear during install if -UI is used.
@wise-io
wise-io / InstallFoxitReader.ps1
Created March 9, 2022 16:56
Installs Foxit Reader Silently
# Installs Foxit Reader Enterprise
# Register here: https://www.foxit.com/pdf-reader/enterprise-register.html
param(
[switch]$Default # Attempt to set Foxit as the default PDF reader
)
$Installer = "$env:temp\FoxitReaderSetup.msi"
$DownloadURL = 'https://www.foxit.com/downloads/latest.html?product=Foxit-Enterprise-Reader&platform=Windows&package_type=msi&language=English'
if ($Default) { $DefaultValue = 1 } else { $DefaultValue = 0 }
@wise-io
wise-io / StartProgram.ps1
Last active March 1, 2022 20:56
PowerShell Script to Start a Program
<#
.SYNOPSIS
Starts the specified program.
.DESCRIPTION
Starts a program if it is not already running.
.EXAMPLE
.\StartProgram.ps1 -Path "C:\WINDOWS\system32\notepad.exe"
#>
param (
@wise-io
wise-io / InstallTeams.ps1
Last active February 28, 2022 20:00
Silently Installs Microsoft Teams
# Installs Microsoft Teams (Machine-Wide)
param(
[switch]$x86 # Attempts to install 32-bit Teams regardless of architecture
)
# Determine architecture
if ($x86) { $Arch = 'x86' }
else {
switch ($env:PROCESSOR_ARCHITECTURE) {
'AMD64' { $Arch = 'x64' }
@wise-io
wise-io / ManageBrowsers.ps1
Last active May 28, 2024 21:28
PowerShell Script to Manage Chrome & Edge Settings via Local Group Policy
<#
.SYNOPSIS
Manages browser settings through local group policy objects (LGPO).
.PARAMETER Audit
Outputs a table of the current browser management policies (LGPO). No new polices will be set.
.PARAMETER Reset
Resets all existing browser management policies (LGPO). No new policies will be set.
.PARAMETER SearchEngine
Specify the default search engine. Supported values are 'Google' or 'Bing'.
#>