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 / 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 / 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 / ManageBrowsers.ps1
Last active April 12, 2024 13:22
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'.
#>
@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 / RemoveApps.ps1
Last active December 30, 2023 19:10
PowerShell script to silently remove various Windows Store applications.
# Remove unnecessary packages
$Allowlist = @(
'DellCommandUpdate', # Dell Command Update app
'HPPrinterControl' # HP Smart app
)
$Identifiers = @(
'AcerIncorporated', # Acer Identifier
'AD2F1837', # HP Identifier
@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 / CleanStart.ps1
Last active September 18, 2023 17:47
Cleans up the taskbar and resets the default start menu layout to remove ads.
# Cleans up default start menu and taskbar (some settings require Windows Pro)
function Install-PSModule {
param(
[Parameter(Position = 0, Mandatory = $true)]
[String[]]$Modules
)
Write-Output "`nChecking for necessary PowerShell modules..."
try {
@wise-io
wise-io / UpdateWindows.ps1
Last active August 24, 2023 22:18
Download & Install Windows Updates with PowerShell
# Install all Windows updates
function Install-PSModule {
param(
[Parameter(Position = 0, Mandatory = $true)]
[String[]]$Modules
)
Write-Output "`nChecking for necessary PowerShell modules..."
try {
# Set PowerShell to TLS 1.2 (https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/)
@wise-io
wise-io / ManageDefenderExclusions.ps1
Created May 9, 2022 19:32
Manage Windows Defender Exclusions
# Manage Windows Defender Exclusions
param (
[switch]$Audit, # Audit exclusions
[string[]]$ASR, # Exclude files/paths from ASR rules
[string[]]$Ext, # Exclude file extensions (Example: exe, txt, pdf)
[string[]]$IP, # Exclude IP addresses
[string[]]$Path, # Exclude paths
[string[]]$Process, # Exclude processes
[switch]$Remove # Remove exclusions
@wise-io
wise-io / ManageBrowserExts.ps1
Last active March 9, 2023 21:03
Manage Chrome & Edge Browser Extensions With PowerShell & Group Policy
<#
.SYNOPSIS
Manages browser extensions through local group policy objects (LGPO).
.DESCRIPTION
This script sets up browser extension allow-listing (whitelisting) though LGPO.
Extensions can be added to the allow list by passing their extension ID via the -ChromeExtIDs or -EdgeExtIDs parameters.
.LINK
Chrome Extension lookup URL: https://chrome.google.com/webstore/detail/[ID]
Edge Extension lookup URL: https://microsoftedge.microsoft.com/addons/detail/[ID]
PolicyFileEditor PowerShell Module: https://github.com/dlwyatt/PolicyFileEditor