Skip to content

Instantly share code, notes, and snippets.

View wise-io's full-sized avatar
🏢
Working remotely

Aaron Stevenson wise-io

🏢
Working remotely
View GitHub Profile
@wise-io
wise-io / ManageDefender.ps1
Last active April 6, 2024 16:26
Manage Windows Defender & Firewall Settings with PowerShell and Group Policy
# Manage Windows Defender & Windows Firewall via Local Group Policy
$ComputerPolicyFile = ($env:SystemRoot + '\System32\GroupPolicy\Machine\registry.pol')
$DefenderKey = 'Software\Policies\Microsoft\Windows Defender'
$FirewallKey = 'Software\Policies\Microsoft\WindowsFirewall'
$ExploitGuardKey = 'Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard'
Write-Output "`nChecking for necessary PowerShell modules..."
try {
# Set PowerShell to TLS 1.2 (https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
@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 February 5, 2025 03:47
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 January 28, 2025 03:32
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' }