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 / ManageBrowsers.ps1
Last active September 2, 2024 12:03
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 / ManageBrowserExts.ps1
Last active September 2, 2024 12: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
@wise-io
wise-io / InstallSplashtopRMMViewer.ps1
Last active February 3, 2025 03:43
Silently Install Splashtop for RMM Viewer
# Installs Splashtop for RMM Viewer
$Installer = "$env:Temp\SplashtopViewer.exe"
$DownloadURL = '' # Add download URL from your RMM provider here
$FileHandlerPrefix = 'st-rmm://*'
$RegValue = '200'
try {
# Download Splashtop for RMM Viewer
Write-Output 'Downloading Splashtop for RMM viewer...'
Invoke-WebRequest -Uri $DownloadURL -OutFile $Installer
@wise-io
wise-io / InstallPowerShell.ps1
Created February 15, 2022 18:03
Silently Install the Latest Version of PowerShell
# Installs PowerShell v7
param(
[switch]$x86 # Installs 32-bit PowerShell regardless of architecture
)
if ($x86) { $Architecture = 'x86' }
else {
switch ($env:PROCESSOR_ARCHITECTURE) {
'AMD64' { $Architecture = 'x64' }
'x86' { $Architecture = 'x86' }
@wise-io
wise-io / InstallOffice.ps1
Last active March 7, 2023 21:33
Installs Microsoft Office via ODT
<#
.SYNOPSIS
Installs Microsoft Office 365
.DESCRIPTION
Installs Microsoft Office 365 using a default configuration xml, unless a custom xml is provided.
WARNING: This script will remove all existing office installations if used with the default configuration xml.
.PARAMETER Config
File path to custom configuration xml for office installations.
.PARAMETER Cleanup
Removes office installation files after install.
@wise-io
wise-io / CreateRestorePoint.ps1
Last active May 8, 2022 04:03
Create System Restore Checkpoint
<#
.SYNOPSIS
Creates a System Restore Point
.DESCRIPTION
Enables System Protection on all local drives and creates a System Restore Point.
.EXAMPLE
./CreateRestorePoint.ps1 -Description 'Installed Quickbooks'
./CreateRestorePoint.ps1 -Force
#>
@wise-io
wise-io / SplashtopSOS.ps1
Last active February 13, 2022 21:05
Downloads Splashtop SOS & Creates Shortcut
SplashtopSOS.ps1
# Downloads Splashtop SOS & creates desktop shortcut
$Executable = "$env:SystemDrive\Utilities\SplashtopSOS.exe"
$DownloadURL = 'https://download.splashtop.com/sos/SplashtopSOS.exe'
try {
# Create Directory
if (!(Test-Path (Split-Path $Executable))) { New-Item -ItemType Directory -Force -Path (Split-Path $Executable) }
# Download Splashtop SOS
@wise-io
wise-io / RemoveQuickTime.ps1
Last active February 13, 2022 21:05
Silently Uninstalls Apple QuickTime (x32 & x64)
# Removes Apple QuickTime
$Paths = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
$App = Get-ChildItem -Path $Paths | Get-ItemProperty | Where-Object { $_.DisplayName -match 'quicktime' } | Select-Object -Property DisplayName, UninstallString
foreach ($Ver in $App) {
if ($Ver.UninstallString) {
$DisplayName = $Ver.DisplayName
$Uninst = $Ver.UninstallString -replace '/I', '/x '
Write-Output "Uninstalling $DisplayName..."
cmd /c $Uninst /qn
@wise-io
wise-io / BackupSQL.ps1
Last active February 21, 2022 22:00
PowerShell Script to Backup SQL Databases on Local Machine
<#
.SYNOPSIS
Backup all SQL databases
.DESCRIPTION
Performs a backup of all SQL databases on all SQL instances of localhost
.NOTES
Backups are stored in the default backup location of the server under the name databasename.bak
Previous backup files named databasename.bak will be overwritten
Backups are not performed when the -History switch is used
.EXAMPLE
@wise-io
wise-io / InstallFonts.ps1
Last active February 17, 2022 02:48
PowerShell Script to Install Custom Fonts using FontReg
# Downloads and installs fonts from a zip archive
param (
[Parameter(Mandatory = $true)]
[ValidatePattern( '^(https)://' )]
[System.Uri]$URL
)
$FontRegURL = '' # Add download link to FontReg here
$FontReg = "$env:temp\FontReg.exe"
$Archive = "$env:temp\Fonts.zip"