Skip to content

Instantly share code, notes, and snippets.

@justinloring
justinloring / PToolsUninstall.ps1
Last active April 11, 2019 19:58
WebEx Productivity Tools Uninstall
(Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -match "WebEx Productivity Tools"}).Uninstall()
Powershell.exe -ExecutionPolicy Bypass -Command "(Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -match 'WebEx Productivity Tools'}).Uninstall()"
@justinloring
justinloring / ShockwaveUninstall.ps1
Last active April 11, 2019 20:31
Shockwave Player Uninstall
Powershell.exe -ExecutionPolicy Bypass -Command "Start 'C:\Windows\System32\Adobe\Shockwave 12\Uninstaller.exe' /S"
@justinloring
justinloring / CMPivot_Device_OSVersion
Created April 17, 2019 14:50
CMPivot - Device/OSVersion
OperatingSystem | summarize by Device, BuildNumber
@justinloring
justinloring / ClearChromeCache.ps1
Created April 20, 2019 02:45
Clear Chrome Cache
Stop-Process -Name chrome -Force
$users1 = (Get-ChildItem "c:\users" | Select-Object Name | Format-Table -HideTableHeaders | Out-String).Trim() | Out-File "C:\temp\Users.txt"
$Users = Get-Content -Path "C:\temp\Users.txt"
foreach ($name in $users)
{
($name | Out-String).Trim() | Out-File "c:\temp\users1.txt" -Append
}
@justinloring
justinloring / SSO_iSeries_Win10.ps1
Created May 3, 2019 20:37
SSO iSeries - Windows 10
#Set Variables
$find1 = 'ssoEnabled=false'
$replace1 = 'ssoEnabled=true'
$find2 = 'acsPasswordPrompt=1_useAcsSetting'
$replace2 = 'acsPasswordPrompt=5_kerberos'
#Update HOD Files in Standard Location
$Dir = get-childitem 'C:\Program Files\IBM_iAccess_Emulator\Emulator' -recurse
@justinloring
justinloring / WindowsStore.ps1
Created May 3, 2019 20:38
Disable/Endable Windows Store
#Disable Windows Store
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" -Name "RemoveWindowsStore" -Value "1" -Force
#Enable Windows Store
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" -Name "RemoveWindowsStore" -Value "0" -Force
@justinloring
justinloring / ServerSecurity.ps1
Created May 3, 2019 20:39
Server Security Update
$acl = get-acl -path \\d-721-01\OSD_BKUP$
$serverlist = Get-Content -Path "C:\RSICode\ServerACL\ServerACL.txt"
 
foreach ($server in $serverlist){
@justinloring
justinloring / MMS2019_Slide_Download.ps1
Created May 8, 2019 15:22
MMS 2019 - Download Slides
##############################################
# #
# File: CopyMMSDE2018Files.ps1 #
# Author: Duncan Russell #
# http://www.sysadmintechnotes.com #
# Edited: Andrew Johnson #
# http://www.andrewj.net #
# Evan Yeung #
# http://www.forevanyeung.com #
# Chris Kibble #
<#
.SYNOPSIS
Redistribute failed packages for specified DP
.DESCRIPTION
The script will check specified DP for packages that has failed according to summarizer events and redist any failed packages.
.PARAMETER Sitecode
Enter SiteCode
.PARAMETER DPFQDN
Enter FQDN for DP with failed packages.
.EXAMPLE
@justinloring
justinloring / Find-DeleteFile.ps1
Created June 7, 2019 14:39
Find and Delete File (Entire PC Search)
Invoke-Command -ScriptBlock {Get-Childitem –Path C:\ -Include "<FILENAME>" -File -Recurse -ErrorAction SilentlyContinue | Remove-Item -Force} -ComputerName "<COMPUTERNAME>"