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 / InstallAdobeReader.ps1
Last active March 3, 2022 17:21
Installs Adobe Acrobat Reader DC Silently
# Installs Adobe Acrobat Reader DC
# Acquire a distribution license from Adobe here: http://www.adobe.com/products/reader/rdr_distribution1.html
# Once you have a valid license, you will have download links for Adobe Installers (without bloatware) for distribution.
$Installer = "$env:temp\AdobeReader.exe"
$DownloadURL = '' # Add download URL here
try {
# Download Installer
Invoke-WebRequest -Uri $DownloadURL -OutFile $Installer
@wise-io
wise-io / InstallZoom.ps1
Last active February 3, 2022 19:53
Silently Installs the Latest Version of Zoom
# Installs Zoom Meetings
$Installer = "$env:temp\ZoomInstallerFull.msi"
$DownloadURL = "https://www.zoom.us/client/latest/ZoomInstallerFull.msi"
try {
# Download Zoom Meetings
Invoke-WebRequest -Uri $DownloadURL -OutFile $Installer
# Install Zoom Meetings
msiexec.exe /i $Installer ALLUSERS=1 /quiet /qn /norestart ZoomAutoUpdate="true"
@wise-io
wise-io / InstallOffice.ps1
Created January 24, 2022 23:15
Office Deployment & LibreOffice / WPS Office Removal Scripts
<#
.SYNOPSIS
Installs Microsoft Office with ODT (Office Deployement Tool)
.DESCRIPTION
This script downloads ODT to download/install Microsoft Office with the provided configuration file. You will need to download the Microsoft ODT tool and run it to get the ODT setup executable.
.EXAMPLE
./InstallOffice.ps1 -config "https://example.com/linktoconfig.xml" -download
.LINK
ODT Download: https://www.microsoft.com/en-us/download/details.aspx?id=49117
XML Configuration Generator: https://config.office.com/
@wise-io
wise-io / RemoveLibreOffice.ps1
Last active February 15, 2022 22:09
Silently Uninstall LibreOffice (x32 & x64)
# Removes LibreOffice Installations (x32 & x64)
$Paths = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
$App = Get-ChildItem -Path $Paths | Get-ItemProperty | Where-Object { $_.DisplayName -like 'LibreOffice*' } | Select-Object
foreach ($Ver in $App) {
if ($Ver.UninstallString) {
$DisplayName = $Ver.DisplayName
$Uninst = $Ver.PSChildName
Write-Output "Uninstalling $DisplayName..."
cmd /c msiexec.exe /qn /uninstall $Uninst
@wise-io
wise-io / RemoveWPSOffice.ps1
Last active February 15, 2022 22:08
Silently Uninstall WPS Office User Installations
# Removes WPS (Kingsoft) Office User Based Installs
$App = Get-ChildItem -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.Publisher -like 'Kingsoft*' } | Select-Object -Property DisplayName, UninstallString
foreach ($Ver in $App) {
if ($Ver.UninstallString) {
$DisplayName = $Ver.DisplayName
$Uninst = $Ver.UninstallString
Write-Output "Uninstalling $DisplayName..."
cmd /c $Uninst /s
}
@wise-io
wise-io / ResetLocalPolicies.ps1
Last active February 16, 2022 20:20
Reset Local Group Policies
<#
.SYNOPSIS
Clears (resets) local group policies.
.DESCRIPTION
Clears (resets) local group policies by deleting registry.pol and associated files.
Warning: this script will result in the loss of existing local policies.
.EXAMPLE
./ResetLocalPolicies.ps1 -Reboot
#>
@wise-io
wise-io / malwarebytes-toolset.ps1
Last active February 15, 2022 22:13
Downloads Malwarebytes Toolset
# https://support.malwarebytes.com/hc/en-us/articles/1500004655761-Download-and-update-the-Malwarebytes-Toolset
param (
[Parameter(Mandatory = $true)]
[string]$RegKey
)
$ArchivePath = "$env:SystemDrive\Utilities\MBTS.zip"
$Toolset = "$env:SystemDrive\Utilities\MBTS"
$DownloadURL = 'https://toolset.malwarebytes.com/file/mbts/' + $RegKey
@wise-io
wise-io / InstallGoogleEarth.ps1
Last active March 3, 2022 17:23
Silently Installs Google Earth Pro
# Installs Google Earth Pro
$Installer = "$env:temp\GoogleEarthPro.exe"
$DownloadURL = 'https://dl.google.com/dl/earth/client/advanced/current/googleearthprowin.exe'
try {
# Download Google Earth Pro
Invoke-WebRequest -Uri $DownloadURL -OutFile $Installer
# Install Google Earth Pro
Start-Process -Wait -FilePath $Installer -ArgumentList 'OMAHA=1'
@wise-io
wise-io / UpdateOffice.ps1
Last active February 13, 2022 21:08
PowerShell Script to Initiate Microsoft Office Updates
# Initiates Microsoft Office updates
$Path = 'C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe'
$Arguments = '/update user'
# Get the process name
$ProcessName = [System.IO.Path]::GetFileNameWithoutExtension($Path)
# Check if Microsoft Office updates are running
$Running = Get-Process $ProcessName -ErrorAction SilentlyContinue
@wise-io
wise-io / UpdateOffice.bat
Last active January 27, 2022 20:38
Batch Script to Initiate Microsoft Office Updates
"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe" /update user