Skip to content

Instantly share code, notes, and snippets.

View mark05e's full-sized avatar

mark05E mark05e

View GitHub Profile
[CmdletBinding(SupportsShouldProcess=$True)]
param(
)
#The download URL for the Teams Machine-Wide Installer for x64 systems.
$teamsInstallDownloadUri = "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&arch=x64&managedInstaller=true&download=true"
# -- Begin searching for a current install of Teams --
Write-Verbose "Looking for a current installation of Teams Machine-Wide Installer."
@mark05e
mark05e / Install-Chrome.ps1
Last active April 1, 2021 17:18 — forked from mattwoolnough/Install-Chrome.ps1
Chrome install one-liner
$Path = $env:TEMP;
$Installer = "chrome_installer.exe";
Invoke-WebRequest "https://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile "$Path$Installer";
Start-Process -FilePath "$Path$Installer" -Args "/silent /install" -Verb RunAs -Wait;
Remove-Item "$Path$Installer"
@mark05e
mark05e / installMsEdge.ps1
Created March 24, 2021 15:42 — forked from stanionascu/installMsEdge.ps1
Install MS Edge via PowerShell
$LocalTempDir = $env:TEMP;
$EdgeInstaller = "MSEdgeInstaller.exe";
(new-object System.Net.WebClient).DownloadFile('https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?ProductreleaseID=Edge&platform=Default&version=Edge&source=EdgeStablePage&Channel=Stable&language=en', "$LocalTempDir\$EdgeInstaller");
& "$LocalTempDir\$EdgeInstaller" /silent /install;
$Process2Monitor = "MSEdgeInstaller";
Do {
$ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name;
If ($ProcessesFound) {
"Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2
} else {
@mark05e
mark05e / Install-MicrosoftTeams.ps1
Created March 24, 2021 17:13
Installs the latest copy of Microsoft Teams.
<#
.Synopsis Downloads and installs the latest version of Microsoft Teams.
.NOTES
TODO: Prevent Teams Firewall Popup
https://thoor.tech/2018/11/microsoft-teams-firewall-prompt/
#>
$LogPath = "$env:WINDIR\Temp\Install-Teams.ps1.log"
Start-Transcript -Path $LogPath
$ec = 1
#!/bin/bash
apt update
apt install -y vim mlocate wget curl net-tools zip
FILE=/usr/share/javascript/proxmox-backup/js/proxmox-backup-gui.js
cp $FILE $FILE.$(date +%d_%m_%Y_%Hhr_%Mm_%Ss).original
# Change Logo, Favicon, Bios Image
mkdir /usr/share/custom/backup
cp /usr/share/javascript/proxmox-backup/images/{logo-128.png,proxmox_logo.png} /usr/share/custom/backup/
@mark05e
mark05e / DriveClean.ps1
Last active May 23, 2024 16:37 — forked from pmsmith/DriveClean.ps1
Simple script to clear temp files and browser cache/history
#------------------------------------------------------------------#
#- Clear-GlobalWindowsCache #
#------------------------------------------------------------------#
Function Clear-GlobalWindowsCache {
Remove-CacheFiles 'C:\Windows\Temp'
Remove-CacheFiles "C:\`$Recycle.Bin"
Remove-CacheFiles "C:\Windows\Prefetch"
C:\Windows\System32\rundll32.exe InetCpl.cpl, ClearMyTracksByProcess 255
C:\Windows\System32\rundll32.exe InetCpl.cpl, ClearMyTracksByProcess 4351
}
# no longer works Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://api.cacher.io/raw/0fcd76d0761e565a8c4e/e62a66f046a5c4645ad5/start-cleanup'))
# Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://api.cacher.io/raw/0fcd76d0761e565a8c4e/61fb2ad04da370ab61c9/start-cleanup'))
Function Start-Cleanup {
<#
.SYNOPSIS
Automate cleaning up a C:\ drive with low disk space
.DESCRIPTION
Cleans the C: drive's Window Temperary files, Windows SoftwareDistribution folder,
the local users Temperary folder, IIS logs(if applicable) and empties the recycling bin.
@mark05e
mark05e / Get-InstalledApp.ps1
Created July 7, 2021 02:14 — forked from Bill-Stewart/Get-InstalledApp.ps1
Get-InstalledApp.ps1
# Get-InstalledApp.ps1
# Written by Bill Stewart (bstewart@iname.com)
#
# Outputs installed applications on one or more computers that match one or
# more criteria.
#
# Version history:
#
# Version 1
# * Written for PowerShell 1.0. Lost in the mists of time.
@mark05e
mark05e / grabRegistryUninstallStrings.ps1
Created July 17, 2021 17:42 — forked from brianfgonzalez/grabRegistryUninstallStrings.ps1
Quick snippet to output a grid of all uninstall strings from the registry.
$ColRegUinst = @()
(Get-Item -Path 'HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall').GetSubKeyNames() |
%{
if ( (Get-Item -Path "HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$_").GetValue("DisplayName") -ne $null)
{
$ObjRegUinst = New-Object System.Object
$ObjRegUinst | Add-Member -Type NoteProperty -Name Publisher -Value (Get-Item -Path "HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$_").GetValue("Publisher")
$ObjRegUinst | Add-Member -Type NoteProperty -Name Name -Value (Get-Item -Path "HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$_").GetValue("DisplayName")
$ObjRegUinst | Add-Member -Type NoteProperty -Name Uninstall -Value (Get-Item -Path "HKLM:\software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$_").GetValue("UninstallString")
$ColRegUinst += $ObjRegUinst
function Get-InstalledSoftware
{
<#
.SYNOPSIS
Reads installed software from registry
.PARAMETER DisplayName
Name or part of name of the software you are looking for
.EXAMPLE