This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| .Removes dell\lenovobloat from a fresh Windows build | |
| .DESCRIPTION | |
| .Removes Dell Bloat | |
| .Removes Lenovo Bloat | |
| #> | |
| ############################################################################################################ | |
| # Initial Setup # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $exitCode = 0 | |
| if (![System.Environment]::Is64BitProcess) | |
| { | |
| # start new PowerShell as x64 bit process, wait for it and gather exit code and standard error output | |
| $sysNativePowerShell = "$($PSHOME.ToLower().Replace("syswow64", "sysnative"))\powershell.exe" | |
| $pinfo = New-Object System.Diagnostics.ProcessStartInfo | |
| $pinfo.FileName = $sysNativePowerShell | |
| $pinfo.Arguments = "-ex bypass -file `"$PSCommandPath`"" | |
| $pinfo.RedirectStandardError = $true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #remove dell bloatware | |
| $remediationscript =@" | |
| REM UNINSTALL SCRIPT----------------------------------------------------------------------------------------------------- | |
| REM If you are looking to add applications to this list, search the registry for the string that is listed in the Programs and Features menu until you find the "UninstallString" | |
| REM These usually can be found in: | |
| REM HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\ and then the SID\Product folders. | |
| REM HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ | |
| REM HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall | |
| REM There may be multiple uninstall strings for the same application, add all of them here. As the dell applications are updated over time, the applicationID can change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ChildItem “HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options” -ea SilentlyContinue | Where {if ($_.Property -contains “Debugger”){($_|Get-ItemProperty).Debugger -like “*PreventStart*”}} | Remove-Item -Force -Recurse; | |
| Get-ChildItem “HKLM:\SOFTWARE\Microsoft\WOW6432Node\Windows NT\CurrentVersion\Image File Execution Options” -ea SilentlyContinue | Where {if ($_.Property -contains “Debugger”){($_|Get-ItemProperty).Debugger -like “*PreventStart*”}} | Remove-Item -Force -Recurse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #by me | |
| #for XXXXXX | |
| #create scheduled task to install zscaler on logon | |
| #copy the zscaler install to a local directory. | |
| $ErrorActionPreference = "SilentlyContinue" | |
| Copy-Item "$PSScriptRoot\zscaler-install.ps1" -Destination $env:TEMP -Force | |
| # register script as scheduled task | |
| $TriggerStartup = New-ScheduledTaskTrigger -AtLogOn | |
| $STPrin = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest -LogonType ServiceAccount | |
| $CustomPath = "$env:TEMP\zscaler-install.ps1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| Install Zscaler | |
| By me for XXXXX, | |
| #> | |
| Function Set-RegistryKey | |
| { | |
| [CmdletBinding()] | |
| Param ( | |
| [Parameter(Mandatory = $True, HelpMessage = "Please Enter Registry Item Path", Position = 1)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Download latest release from github | |
| $Repo = "https://api.github.com/repos/microsoft/winget-cli/releases/latest" | |
| # --- Query the API to get the url of the zip | |
| $APIResponse = Invoke-RestMethod -Method Get -Uri $Repo | |
| $FileUrl = $APIResponse.assets.browser_download_url | where {$_ -match ".msixbundle"} | |
| # --- Download the file to the current location | |
| $fileName = "$($APIResponse.name.Replace(" ","_")).msixbundle" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $exitCode = 0 | |
| if (![System.Environment]::Is64BitProcess) | |
| { | |
| # start new PowerShell as x64 bit process, wait for it and gather exit code and standard error output | |
| $sysNativePowerShell = "$($PSHOME.ToLower().Replace("syswow64", "sysnative"))\powershell.exe" | |
| $pinfo = New-Object System.Diagnostics.ProcessStartInfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $exitCode = 0 | |
| if (![System.Environment]::Is64BitProcess) | |
| { | |
| # start new PowerShell as x64 bit process, wait for it and gather exit code and standard error output | |
| $sysNativePowerShell = "$($PSHOME.ToLower().Replace("syswow64", "sysnative"))\powershell.exe" | |
| $pinfo = New-Object System.Diagnostics.ProcessStartInfo | |
| $pinfo.FileName = $sysNativePowerShell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .NOTES | |
| =========================================================================== | |
| Created with: SAPIEN Technologies, Inc., PowerShell Studio 2018 v5.5.150 | |
| Created on: 6/08/2019 6:08 PM | |
| Created by: tausifkhan | |
| Organization: FICO | |
| Filename: | |
| =========================================================================== | |
| .DESCRIPTION |
NewerOlder