source
stringclasses
1 value
repo
stringclasses
33 values
repo_url
stringclasses
33 values
path
stringlengths
7
179
language
stringclasses
1 value
license
stringclasses
4 values
stars
int64
2.27k
53.4k
ref
stringclasses
4 values
size_bytes
int64
48
259k
text
stringlengths
48
259k
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
windev.ps1
PowerShell
mit
53,427
main
536
<# .SYNOPSIS This Script is used as a target for the https://christitus.com/windev alias. .DESCRIPTION This Script provides a simple way to start the bleeding edge release of winutil. .EXAMPLE irm https://christitus.com/windev | iex OR Run in Admin Powershell > ./windev.ps1 #> $latestTag = (Invoke...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
Compile.ps1
PowerShell
mit
53,427
main
4,926
param ( [switch]$Run, [string]$Arguments ) if ((Get-Item ".\winutil.ps1" -ErrorAction SilentlyContinue).IsReadOnly) { Remove-Item ".\winutil.ps1" -Force } $OFS = "`r`n" $scriptname = "winutil.ps1" $workingdir = $PSScriptRoot # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) $syn...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
tools/devdocs-generator.ps1
PowerShell
mit
53,427
main
13,590
<# .DESCRIPTION Generates Hugo markdown docs from config/tweaks.json and config/feature.json. Run by the GitHub Actions docs workflow before Hugo build. #> function Update-Progress { param ( [Parameter(Mandatory, position=0)] [string]$StatusMessage, [Parameter(Mandatory, positio...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
tools/Invoke-Preprocessing.ps1
PowerShell
mit
53,427
main
8,327
function Invoke-Preprocessing { <# .SYNOPSIS A function that does Code Formatting using RegEx, useful when trying to force specific coding standard(s) to a project. .PARAMETER ExcludedFiles A list of file paths which're *relative to* 'WorkingDir' Folder, every item in the list can b...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
lint/PSScriptAnalyser.ps1
PowerShell
mit
53,427
main
1,140
@{ # Only diagnostic records of the specified severity will be generated. # Uncomment the following line if you only want Errors and Warnings but # not Information diagnostic records. # Severity = @('Error','Warning') # Analyze **only** the following rules. Use IncludeRules when you want # to i...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
pester/functions.Tests.ps1
PowerShell
mit
53,427
main
2,461
#=========================================================================== # Tests - Functions #=========================================================================== Describe "Comprehensive Checks for PS1 Files in Functions Folder" { BeforeAll { # Get all .ps1 files in the functions folder $...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
pester/configs.Tests.ps1
PowerShell
mit
53,427
main
3,688
# Import Config Files $global:importedconfigs = @{} Get-ChildItem .\config | Where-Object {$_.Extension -eq ".json"} | ForEach-Object { $global:importedconfigs[$psitem.BaseName] = Get-Content $psitem.FullName | ConvertFrom-Json } #=========================================================================== # Tests...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
scripts/start.ps1
PowerShell
mit
53,427
main
3,460
<# .NOTES Author : Chris Titus @christitustech Runspace Author: @DeveloperDurp GitHub : https://github.com/ChrisTitusTech Version : #{replaceme} #> param ( [string]$Config, [switch]$Run, [switch]$Noui, [switch]$Offline ) if ($Config) { $PARAM_CONFIG = $Config...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
scripts/main.ps1
PowerShell
mit
53,427
main
22,886
# Create enums Add-Type @" public enum PackageManagers { Winget, Choco } "@ # SPDX-License-Identifier: MIT # Set the maximum number of threads for the RunspacePool to the number of threads on the machine $maxthreads = [int]$env:NUMBER_OF_PROCESSORS # Create a new session state for parsing variables into our r...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Update-WinUtilProgramWinget.ps1
PowerShell
mit
53,427
main
623
Function Update-WinUtilProgramWinget { <# .SYNOPSIS This will update all programs using WinGet #> [ScriptBlock]$wingetinstall = { $host.ui.RawUI.WindowTitle = """WinGet Install""" Start-Transcript "$logdir\winget-update_$dateTime.log" -Append winget upgrade --all --...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilCurrentSystem.ps1
PowerShell
mit
53,427
main
5,782
Function Invoke-WinUtilCurrentSystem { <# .SYNOPSIS Checks to see what tweaks have already been applied and what programs are installed, and checks the according boxes .EXAMPLE InvokeWinUtilCurrentSystem -Checkbox "winget" #> param( $CheckBox ) if ($CheckBox -eq ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Set-WinUtilDNS.ps1
PowerShell
mit
53,427
main
1,379
function Set-WinUtilDNS { <# .SYNOPSIS Sets the DNS of all interfaces that are in the "Up" state. It will lookup the values from the DNS.Json file .PARAMETER DNSProvider The DNS provider to set the DNS server to .EXAMPLE Set-WinUtilDNS -DNSProvider "google" #> param($...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilISOUSB.ps1
PowerShell
mit
53,427
main
13,655
function Invoke-WinUtilISORefreshUSBDrives { $combo = $sync["WPFWin11ISOUSBDriveComboBox"] $removable = @(Get-Disk | Where-Object { $_.BusType -eq "USB" } | Sort-Object Number) $combo.Items.Clear() if ($removable.Count -eq 0) { $combo.Items.Add("No USB drives detected.") $combo.Sele...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Install-WinUtilProgramWinget.ps1
PowerShell
mit
53,427
main
4,223
Function Install-WinUtilProgramWinget { <# .SYNOPSIS Runs the designated action on the provided programs using Winget .PARAMETER Programs A list of programs to process .PARAMETER action The action to perform on the programs, can be either 'Install' or 'Uninstall' .NOTES The triple...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Get-WPFObjectName.ps1
PowerShell
mit
53,427
main
1,051
function Get-WPFObjectName { <# .SYNOPSIS This is a helper function that generates an objectname with the prefix WPF that can be used as a Powershell Variable after compilation. To achieve this, all characters that are not a-z, A-Z or 0-9 are simply removed from the name. .P...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Show-CustomDialog.ps1
PowerShell
mit
53,427
main
13,357
function Show-CustomDialog { <# .SYNOPSIS Displays a custom dialog box with an image, heading, message, and an OK button. .DESCRIPTION This function creates a custom dialog box with the specified message and additional elements such as an image, heading, and an OK button. The dialog box is designed...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilFeatureInstall.ps1
PowerShell
mit
53,427
main
2,033
function Invoke-WinUtilFeatureInstall { <# .SYNOPSIS Converts all the values from the tweaks.json and routes them to the appropriate function #> param( $CheckBox ) if($sync.configs.feature.$CheckBox.feature) { Foreach( $feature in $sync.configs.feature.$CheckBox.featu...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Find-TweaksByNameOrDescription.ps1
PowerShell
mit
53,427
main
4,907
function Find-TweaksByNameOrDescription { <# .SYNOPSIS Searches through the Tweaks on the Tweaks Tab and hides all entries that do not match the search string .PARAMETER SearchString The string to be searched for #> param( [Parameter(Mandatory=$false)] ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinutilThemeChange.ps1
PowerShell
mit
53,427
main
7,438
function Invoke-WinutilThemeChange { <# .SYNOPSIS Toggles between light and dark themes for a Windows utility application. .DESCRIPTION This function toggles the theme of the user interface between 'Light' and 'Dark' modes, modifying various UI elements such as colors, margins, corn...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Get-WinUtilSelectedPackages.ps1
PowerShell
mit
53,427
main
2,226
function Get-WinUtilSelectedPackages { <# .SYNOPSIS Sorts given packages based on installer preference and availability. .OUTPUTS Hashtable. Key = Package Manager, Value = ArrayList of packages to install #> param ( [Parameter(Mandatory=$true)] $PackageList, ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Initialize-InstallCategoryAppList.ps1
PowerShell
mit
53,427
main
5,012
function Initialize-InstallCategoryAppList { <# .SYNOPSIS Clears the Target Element and sets up a "Loading" message. This is done, because loading of all apps can take a bit of time in some scenarios Iterates through all Categories and Apps and adds them to the UI Used to...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Hide-WPFInstallAppBusy.ps1
PowerShell
mit
53,427
main
461
function Hide-WPFInstallAppBusy { <# .SYNOPSIS Hides the busy overlay in the install app area of the WPF form. This is used to indicate that an install or uninstall has finished. #> Invoke-WPFUIThread -ScriptBlock { $sync.InstallAppAreaOverlay.Visibility = [Windows.Visibility]::C...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilInstallPSProfile.ps1
PowerShell
mit
53,427
main
280
function Invoke-WinUtilInstallPSProfile { if (Test-Path $Profile) { Rename-Item $Profile -NewName ($Profile + '.bak') } Start-Process pwsh -ArgumentList '-Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"' }
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Reset-WPFCheckBoxes.ps1
PowerShell
mit
53,427
main
3,480
function Reset-WPFCheckBoxes { <# .SYNOPSIS Set winutil checkboxs to match $sync.selected values. Should only need to be run if $sync.selected updated outside of UI (i.e. presets or import) .PARAMETER doToggles Whether or not to set UI toggles. WARNING: they will trigger if altered...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Initialize-InstallAppArea.ps1
PowerShell
mit
53,427
main
6,138
function Initialize-InstallAppArea { <# .SYNOPSIS Creates a [Windows.Controls.ScrollViewer] containing a [Windows.Controls.ItemsControl] which is setup to use Virtualization to only load the visible elements for performance reasons. This is used as the parent object f...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Show-WPFInstallAppBusy.ps1
PowerShell
mit
53,427
main
974
function Show-WPFInstallAppBusy { <# .SYNOPSIS Displays a busy overlay in the install app area of the WPF form. This is used to indicate that an install or uninstall is in progress. Dynamically updates the size of the overlay based on the app area on each invocation. .PARAMETER text ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilAssets.ps1
PowerShell
mit
53,427
main
8,539
function Invoke-WinUtilAssets { param ( $type, $Size, [switch]$render ) # Create the Viewbox and set its size $LogoViewbox = New-Object Windows.Controls.Viewbox $LogoViewbox.Width = $Size $LogoViewbox.Height = $Size # Create a Canvas to hold the paths $canvas = New-Object Windows.Con...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Get-LocalizedYesNo.ps1
PowerShell
mit
53,427
main
1,189
function Get-LocalizedYesNo { <# .SYNOPSIS This function runs choice.exe and captures its output to extract yes no in a localized Windows .DESCRIPTION The function retrieves the output of the command 'cmd /c "choice <nul 2>nul"' and converts the default output for Yes and No in the localized fo...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Install-WinUtilChoco.ps1
PowerShell
mit
53,427
main
397
function Install-WinUtilChoco { <# .SYNOPSIS Installs Chocolatey if it is not already installed #> if ((Test-WinUtilPackageManager -choco) -eq "installed") { return } Write-Host "Chocolatey is not installed. Installing now..." Invoke-WebRequest -Uri https://community.choc...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilISOScript.ps1
PowerShell
mit
53,427
main
22,921
function Invoke-WinUtilISOScript { <# .SYNOPSIS Applies WinUtil modifications to a mounted Windows 11 install.wim image. .DESCRIPTION Removes AppX bloatware and OneDrive, optionally injects all drivers exported from the running system into install.wim and boot.wim (controlled by the...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilISO.ps1
PowerShell
mit
53,427
main
32,507
function Write-Win11ISOLog { param([string]$Message) $ts = (Get-Date).ToString("HH:mm:ss") $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ $current = $sync["WPFWin11ISOStatusLog"].Text if ($current -eq "Ready. Please select a Windows 11 ISO to begin.") { $sync["WPFWin11...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Set-WinUtilTaskbarItem.ps1
PowerShell
mit
53,427
main
3,169
function Set-WinUtilTaskbaritem { <# .SYNOPSIS Modifies the Taskbaritem of the WPF Form .PARAMETER value Value can be between 0 and 1, 0 being no progress done yet and 1 being fully completed Value does not affect item without setting the state to 'Normal', 'Error' or 'Paused' ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Remove-WinUtilAPPX.ps1
PowerShell
mit
53,427
main
538
function Remove-WinUtilAPPX { <# .SYNOPSIS Removes all APPX packages that match the given name .PARAMETER Name The name of the APPX package to remove .EXAMPLE Remove-WinUtilAPPX -Name "Microsoft.Microsoft3DViewer" #> param ( $Name ) Write-Host "Removi...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Update-WinUtilSelections.ps1
PowerShell
mit
53,427
main
2,312
function Update-WinUtilSelections { <# .SYNOPSIS Updates the $sync.selected variables with a given preset. .PARAMETER flatJson The flattened json list of $sync values to select. #> param ( $flatJson ) Write-Debug "JSON to import: $($flatJson)" foreach ($item ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilSponsors.ps1
PowerShell
mit
53,427
main
1,560
Function Invoke-WinUtilSponsors { <# .SYNOPSIS Lists Sponsors from ChrisTitusTech .DESCRIPTION Lists Sponsors from ChrisTitusTech .EXAMPLE Invoke-WinUtilSponsors .NOTES This function is used to list sponsors from ChrisTitusTech #> try { # Define the UR...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilExplorerUpdate.ps1
PowerShell
mit
53,427
main
1,252
function Invoke-WinUtilExplorerUpdate { <# .SYNOPSIS Refreshes the Windows Explorer #> param ( [string]$action = "refresh" ) if ($action -eq "refresh") { Invoke-WPFRunspace -ScriptBlock { # Define the Win32 type only if it doesn't exist if (-not ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Test-WinUtilPackageManager.ps1
PowerShell
mit
53,427
main
1,924
function Test-WinUtilPackageManager { <# .SYNOPSIS Checks if WinGet and/or Choco are installed .PARAMETER winget Check if WinGet is installed .PARAMETER choco Check if Chocolatey is installed #> Param( [System.Management.Automation.SwitchParameter]$winget, ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilSSHServer.ps1
PowerShell
mit
53,427
main
2,532
function Invoke-WinUtilSSHServer { <# .SYNOPSIS Enables OpenSSH server to remote into your windows device #> # Install the OpenSSH Server feature if not already installed if ((Get-WindowsCapability -Name OpenSSH.Server -Online).State -ne "Installed") { Write-Host "Enabling OpenSSH S...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Set-Preferences.ps1
PowerShell
mit
53,427
main
2,693
function Set-Preferences{ param( [switch]$save=$false ) # TODO delete this function sometime later function Clean-OldPrefs{ if (Test-Path -Path "$winutildir\LightTheme.ini") { $sync.preferences.theme = "Light" Remove-Item -Path "$winutildir\LightTheme.ini" ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilFontScaling.ps1
PowerShell
mit
53,427
main
2,745
function Invoke-WinUtilFontScaling { <# .SYNOPSIS Applies UI and font scaling for accessibility .PARAMETER ScaleFactor Sets the scaling from 0.75 and 2.0. Default is 1.0 (100% - no scaling) .EXAMPLE Invoke-WinUtilFontScaling -ScaleFactor 1.25 # Applies 125% sca...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Get-WinUtilToggleStatus.ps1
PowerShell
mit
53,427
main
2,884
Function Get-WinUtilToggleStatus { <# .SYNOPSIS Pulls the registry keys for the given toggle switch and checks whether the toggle should be checked or unchecked .PARAMETER ToggleSwitch The name of the toggle to check .OUTPUTS Boolean to set the toggle's status to #> ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilScript.ps1
PowerShell
mit
53,427
main
1,610
function Invoke-WinUtilScript { <# .SYNOPSIS Invokes the provided scriptblock. Intended for things that can't be handled with the other functions. .PARAMETER Name The name of the scriptblock being invoked .PARAMETER scriptblock The scriptblock to be invoked .EXAMPLE ...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Initialize-InstallAppEntry.ps1
PowerShell
mit
53,427
main
3,836
function Initialize-InstallAppEntry { <# .SYNOPSIS Creates the app entry to be placed on the install tab for a given app Used to as part of the Install Tab UI generation .PARAMETER TargetElement The Element into which the Apps should be placed .PARAMETER a...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Set-WinUtilScheduledTask.ps1
PowerShell
mit
53,427
main
1,324
function Set-WinUtilScheduledTask { <# .SYNOPSIS Enables/Disables the provided Scheduled Task .PARAMETER Name The path to the Scheduled Task .PARAMETER State The State to set the Task to .EXAMPLE Set-WinUtilScheduledTask -Name "Microsoft\Windows\Application Experi...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Get-WinUtilInstallerProcess.ps1
PowerShell
mit
53,427
main
452
function Get-WinUtilInstallerProcess { <# .SYNOPSIS Checks if the given process is running .PARAMETER Process The process to check .OUTPUTS Boolean - True if the process is running #> param($Process) if ($Null -eq $Process) { return $false } if (...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Add-SelectedAppsMenuItem.ps1
PowerShell
mit
53,427
main
3,071
function Add-SelectedAppsMenuItem { <# .SYNOPSIS This is a helper function that generates and adds the Menu Items to the Selected Apps Popup. .Parameter name The actual Name of an App like "Chrome" or "Brave" This name is contained in the "Content" property i...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Set-WinUtilProgressbar.ps1
PowerShell
mit
53,427
main
932
function Set-WinUtilProgressbar{ <# .SYNOPSIS This function is used to Update the Progress Bar displayed in the winutil GUI. It will be automatically hidden if the user clicks something and no process is running .PARAMETER Label The Text to be overlaid onto the Progress Bar .PARA...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Install-WinUtilProgramChoco.ps1
PowerShell
mit
53,427
main
10,313
function Install-WinUtilProgramChoco { <# .SYNOPSIS Manages the installation or uninstallation of a list of Chocolatey packages. .PARAMETER Programs A string array containing the programs to be installed or uninstalled. .PARAMETER Action Specifies the action to perform: "Install" or "Unins...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilTweaks.ps1
PowerShell
mit
53,427
main
4,407
function Invoke-WinUtilTweaks { <# .SYNOPSIS Invokes the function associated with each provided checkbox .PARAMETER CheckBox The checkbox to invoke .PARAMETER undo Indicates whether to undo the operation contained in the checkbox .PARAMETER KeepServiceStartup Indi...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Find-AppsByNameOrDescription.ps1
PowerShell
mit
53,427
main
3,304
function Find-AppsByNameOrDescription { <# .SYNOPSIS Searches through the Apps on the Install Tab and hides all entries that do not match the string .PARAMETER SearchString The string to be searched for #> param( [Parameter(Mandatory=$false)] [string]...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Invoke-WinUtilUninstallPSProfile.ps1
PowerShell
mit
53,427
main
327
function Invoke-WinUtilUninstallPSProfile { if (Test-Path ($Profile + '.bak')) { Remove-Item $Profile Rename-Item ($Profile + '.bak') -NewName $Profile } else { Remove-Item $Profile } Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green }
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Set-WinUtilRegistry.ps1
PowerShell
mit
53,427
main
1,794
function Set-WinUtilRegistry { <# .SYNOPSIS Modifies the registry based on the given inputs .PARAMETER Name The name of the key to modify .PARAMETER Path The path to the key .PARAMETER Type The type of value to set the key to .PARAMETER Value The valu...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Set-WinUtilService.ps1
PowerShell
mit
53,427
main
1,226
Function Set-WinUtilService { <# .SYNOPSIS Changes the startup type of the given service .PARAMETER Name The name of the service to modify .PARAMETER StartupType The startup type to set the service to .EXAMPLE Set-WinUtilService -Name "HomeGroupListener" -StartupT...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Install-WinUtilWinget.ps1
PowerShell
mit
53,427
main
498
function Install-WinUtilWinget { <# .SYNOPSIS Installs WinGet if not already installed. .DESCRIPTION installs winGet if needed #> if ((Test-WinUtilPackageManager -winget) -eq "installed") { return } Write-Host "WinGet is not installed. Installing now..." -Foregroun...
github
ChrisTitusTech/winutil
https://github.com/ChrisTitusTech/winutil
functions/private/Get-WinUtilVariables.ps1
PowerShell
mit
53,427
main
800
function Get-WinUtilVariables { <# .SYNOPSIS Gets every form object of the provided type .OUTPUTS List containing every object that matches the provided type #> param ( [Parameter()] [string[]]$Type ) $keys = ($sync.keys).where{ $_ -like "WPF*" } if ($Ty...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Win11Debloat.ps1
PowerShell
mit
45,465
master
21,854
[CmdletBinding(SupportsShouldProcess)] param ( [switch]$CLI, [switch]$Silent, [switch]$Sysprep, [string]$LogPath, [string]$User, [switch]$NoRestartExplorer, [switch]$CreateRestorePoint, [switch]$RunAppsListGenerator, [switch]$RunDefaults, [switch]$RunDefaultsLite, [switch]$Ru...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Get.ps1
PowerShell
mit
45,465
master
8,047
param ( [switch]$CLI, [switch]$Silent, [switch]$Verbose, [switch]$Sysprep, [string]$LogPath, [string]$User, [switch]$NoRestartExplorer, [switch]$CreateRestorePoint, [switch]$RunAppsListGenerator, [switch]$RunDefaults, [switch]$RunDefaultsLite, [switch]$RunSavedSettings, ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Get-Dev.ps1
PowerShell
mit
45,465
master
8,004
param ( [switch]$CLI, [switch]$Silent, [switch]$Verbose, [switch]$Sysprep, [string]$LogPath, [string]$User, [switch]$NoRestartExplorer, [switch]$CreateRestorePoint, [switch]$RunAppsListGenerator, [switch]$RunDefaults, [switch]$RunDefaultsLite, [switch]$RunSavedSettings, ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/Show-Bubble.ps1
PowerShell
mit
45,465
master
3,685
function Hide-Bubble { param ( [Parameter(Mandatory=$false)] [switch]$Immediate ) if ($script:BubbleTimer) { $script:BubbleTimer.Stop() $script:BubbleTimer = $null } if (-not $script:BubblePopup) { return } if ($Immediate -or -not $script:BubblePopup.Child) { ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/SetWindowThemeResources.ps1
PowerShell
mit
45,465
master
11,912
# Sets resource colors for a WPF window based on dark mode preference function SetWindowThemeResources { param ( $window, [bool]$usesDarkMode ) if ($usesDarkMode) { $window.Resources.Add("BgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::Co...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/Show-MessageBox.ps1
PowerShell
mit
45,465
master
5,356
# Shows a Windows 11 styled custom message box function Show-MessageBox { param ( [Parameter(Mandatory=$true)] [string]$Message, [Parameter(Mandatory=$false)] [string]$Title = "Win11Debloat", [Parameter(Mandatory=$false)] [ValidateSet('OK', 'OKCancel...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/GetSystemUsesDarkMode.ps1
PowerShell
mit
45,465
master
306
# Checks if the system is set to use dark mode for apps function GetSystemUsesDarkMode { try { return (Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize' -Name 'AppsUseLightTheme').AppsUseLightTheme -eq 0 } catch { return $false } }
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/Show-AboutDialog.ps1
PowerShell
mit
45,465
master
2,662
function Show-AboutDialog { param ( [Parameter(Mandatory=$false)] [System.Windows.Window]$Owner = $null ) Add-Type -AssemblyName PresentationFramework,PresentationCore,WindowsBase | Out-Null $usesDarkMode = GetSystemUsesDarkMode # Determine owner window $ownerWindo...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/ApplySettingsToUiControls.ps1
PowerShell
mit
45,465
master
2,518
# Applies settings from a JSON object to UI controls (checkboxes and comboboxes) # Used by LoadDefaultsBtn and LoadLastUsedBtn in the UI function ApplySettingsToUiControls { param ( $window, $settingsJson, $uiControlMappings ) if (-not $settingsJson -or -not $settingsJson.Settin...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/Show-AppSelectionWindow.ps1
PowerShell
mit
45,465
master
6,071
# Shows application selection window that allows the user to select what apps they want to remove or keep function Show-AppSelectionWindow { Add-Type -AssemblyName PresentationFramework,PresentationCore,WindowsBase | Out-Null $usesDarkMode = GetSystemUsesDarkMode # Show overlay if main window exists ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/AttachShiftClickBehavior.ps1
PowerShell
mit
45,465
master
2,822
# Attaches shift-click selection behavior to a checkbox in an apps panel # Parameters: # - $checkbox: The checkbox to attach the behavior to # - $appsPanel: The StackPanel containing checkbox items # - $lastSelectedCheckboxRef: A reference to a variable storing the last clicked checkbox # - $updateStatusCallbac...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/Show-ConfigWindow.ps1
PowerShell
mit
45,465
master
17,897
function Show-ImportExportConfigWindow { param ( [System.Windows.Window]$Owner, [bool]$UsesDarkMode, [string]$Title, [string]$Prompt, [string[]]$Categories = @('Applications', 'System Tweaks', 'Deployment Settings'), [string[]]$DisabledCategories = @(), [hasht...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/Show-ApplyModal.ps1
PowerShell
mit
45,465
master
11,588
function Show-ApplyModal { param ( [Parameter(Mandatory=$false)] [System.Windows.Window]$Owner = $null, [Parameter(Mandatory=$false)] [bool]$RestartExplorer = $false ) Add-Type -AssemblyName PresentationFramework,PresentationCore,WindowsBase | Out-Null # P/Invoke he...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/GUI/Show-MainWindow.ps1
PowerShell
mit
45,465
master
95,424
function Show-MainWindow { Add-Type -AssemblyName PresentationFramework,PresentationCore,WindowsBase,System.Windows.Forms | Out-Null # Helper to constrain the maximized window to the monitor working area (respects taskbar). # Required for WindowStyle=None windows — without this the window extends behind th...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/AppRemoval/GetInstalledAppsViaWinget.ps1
PowerShell
mit
45,465
master
915
# Run winget list and return installed apps. # Use -NonBlocking to keep the UI responsive (GUI mode) via Invoke-NonBlocking. function GetInstalledAppsViaWinget { param ( [int]$TimeOut = 10, [switch]$NonBlocking ) if (-not $script:WingetInstalled) { return $null } $fetchBlock = { ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/AppRemoval/RemoveApps.ps1
PowerShell
mit
45,465
master
6,399
# Removes apps specified during function call based on the target scope. function RemoveApps { param ( $appslist ) # Determine target from script-level params, defaulting to AllUsers $targetUser = GetTargetUserForAppRemoval $appIndex = 0 $appCount = @($appsList).Count $edgeIds = @(...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/AppRemoval/ForceRemoveEdge.ps1
PowerShell
mit
45,465
master
2,974
# Forcefully removes Microsoft Edge using its uninstaller # Credit: Based on work from loadstring1 & ave9858 function ForceRemoveEdge { Write-Host "> Forcefully uninstalling Microsoft Edge..." $regView = [Microsoft.Win32.RegistryView]::Registry32 $hklm = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsof...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Features/ReplaceStartMenu.ps1
PowerShell
mit
45,465
master
3,708
# Replace the startmenu for all users, when using the default startmenuTemplate this clears all pinned apps # Credit: https://lazyadmin.nl/win-11/customize-windows-11-start-menu-layout/ function ReplaceStartMenuForAllUsers { param ( $startMenuTemplate = "$script:AssetsPath/Start/start2.bin" ) Write...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Features/DisableStoreSearchSuggestions.ps1
PowerShell
mit
45,465
master
2,657
# Disables Microsoft Store search suggestions in the start menu for all users by denying access to the Store app database file for each user function DisableStoreSearchSuggestionsForAllUsers { # Get path to Store app database for all users $userPathString = GetUserDirectory -userName "*" -fileName "AppData\Loca...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Features/EnableWindowsFeature.ps1
PowerShell
mit
45,465
master
513
# Enables a Windows optional feature and pipes its output to the console function EnableWindowsFeature { param ( [string]$FeatureName ) $result = Invoke-NonBlocking -ScriptBlock { param($name) Enable-WindowsOptionalFeature -Online -FeatureName $name -All -NoRestart } -ArgumentLi...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Features/ImportRegistryFile.ps1
PowerShell
mit
45,465
master
4,043
# Import & execute regfile function ImportRegistryFile { param ( $message, $path ) Write-Host $message $usesOfflineHive = $script:Params.ContainsKey("Sysprep") -or $script:Params.ContainsKey("User") $regFilePath = if ($usesOfflineHive) { "$script:RegfilesPath\Sysprep\$path"...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Features/ExecuteChanges.ps1
PowerShell
mit
45,465
master
7,592
# Executes a single parameter/feature based on its key # Parameters: # $paramKey - The parameter name to execute function ExecuteParameter { param ( [string]$paramKey ) # Check if this feature has metadata in Features.json $feature = $null if ($script:Features.ContainsKey($paramKey)) ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Features/CreateSystemRestorePoint.ps1
PowerShell
mit
45,465
master
3,989
function CreateSystemRestorePoint { $SysRestore = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "RPSessionInterval" $failed = $false if ($SysRestore.RPSessionInterval -eq 0) { # In GUI mode, skip the prompt and just try to enable it if ($scr...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Features/RestartExplorer.ps1
PowerShell
mit
45,465
master
1,385
# Restart the Windows Explorer process function RestartExplorer { Write-Host "> Attempting to restart the Windows Explorer process to apply all changes..." if ($script:Params.ContainsKey("Sysprep") -or $script:Params.ContainsKey("User") -or $script:Params.ContainsKey("NoRestartExplorer")) { Write-H...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Threading/DoEvents.ps1
PowerShell
mit
45,465
master
703
# Processes all pending WPF window messages (input, render, etc.) to keep the UI responsive # during long-running operations on the UI thread. Equivalent to Application.DoEvents(). function DoEvents { if (-not $script:GuiWindow) { return } $frame = [System.Windows.Threading.DispatcherFrame]::new() $null = [...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Threading/Invoke-NonBlocking.ps1
PowerShell
mit
45,465
master
1,888
# Runs a scriptblock in a background PowerShell runspace while keeping the UI responsive. # In GUI mode, the work executes on a separate thread and the UI thread pumps messages (~60fps). # In CLI mode, the scriptblock runs directly in the current session. function Invoke-NonBlocking { param( [scriptblock]$S...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/ImportConfigToParams.ps1
PowerShell
mit
45,465
master
4,481
function ImportConfigToParams { param ( [Parameter(Mandatory = $true)] [string]$ConfigPath, [int]$CurrentBuild, [string]$ExpectedVersion = '1.0' ) $resolvedConfigPath = $null try { $resolvedConfigPath = (Resolve-Path -LiteralPath $ConfigPath -ErrorAction Stop).Pa...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/GetUserName.ps1
PowerShell
mit
45,465
master
146
function GetUserName { if ($script:Params.ContainsKey("User")) { return $script:Params.Item("User") } return $env:USERNAME }
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/GenerateAppsList.ps1
PowerShell
mit
45,465
master
622
# Generates a list of apps to remove based on the Apps parameter function GenerateAppsList { if (-not ($script:Params["Apps"] -and $script:Params["Apps"] -is [string])) { return @() } $appMode = $script:Params["Apps"].toLower() switch ($appMode) { 'default' { $appsList = Lo...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/CheckIfUserExists.ps1
PowerShell
mit
45,465
master
719
function CheckIfUserExists { param ( $userName ) if ($userName -match '[<>:"|?*]') { return $false } if ([string]::IsNullOrWhiteSpace($userName)) { return $false } try { $userExists = Test-Path "$env:SystemDrive\Users\$userName" if ($userExists) { ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/GetTargetUserForAppRemoval.ps1
PowerShell
mit
45,465
master
374
# Target is determined from $script:Params["AppRemovalTarget"] or defaults to "AllUsers" # Target values: "AllUsers" (removes for all users + from image), "CurrentUser", or a specific username function GetTargetUserForAppRemoval { if ($script:Params.ContainsKey("AppRemovalTarget")) { return $script:Params["...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/TestIfUserIsLoggedIn.ps1
PowerShell
mit
45,465
master
1,246
function TestIfUserIsLoggedIn { param( [Parameter(Mandatory)] [string]$Username ) try { $quserOutput = @(& quser 2>$null) if ($LASTEXITCODE -ne 0 -or -not $quserOutput) { return $false } foreach ($line in ($quserOutput | Select-Object -Skip 1)) {...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/AddParameter.ps1
PowerShell
mit
45,465
master
379
# Add parameter to script and write to file function AddParameter { param ( $parameterName, $value = $true ) # Add parameter or update its value if key already exists if (-not $script:Params.ContainsKey($parameterName)) { $script:Params.Add($parameterName, $value) } else...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/GetFriendlyTargetUserName.ps1
PowerShell
mit
45,465
master
246
function GetFriendlyTargetUserName { $target = GetTargetUserForAppRemoval switch ($target) { "AllUsers" { return "all users" } "CurrentUser" { return "the current user" } default { return "user $target" } } }
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/CheckModernStandbySupport.ps1
PowerShell
mit
45,465
master
734
# Check if this machine supports S0 Modern Standby power state. Returns true if S0 Modern Standby is supported, false otherwise. function CheckModernStandbySupport { $count = 0 try { switch -Regex (powercfg /a) { ':' { $count += 1 } '(.*S0.{1,}\))' {...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/Helpers/GetUserDirectory.ps1
PowerShell
mit
45,465
master
1,339
# Returns the directory path of the specified user, exits script if user path can't be found function GetUserDirectory { param ( $userName, $fileName = "", $exitIfPathNotFound = $true ) try { if (-not (CheckIfUserExists -userName $userName) -and $userName -ne "*") { ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/FileIO/ValidateAppslist.ps1
PowerShell
mit
45,465
master
791
# Returns a validated list of apps based on the provided appsList and the supported apps from Apps.json function ValidateAppslist { param ( $appsList ) $supportedAppsList = @(LoadAppsDetailsFromJson | ForEach-Object { @($_.AppId) }) | ForEach-Object { $_.Trim() } | Where-Object { $_.Length -gt 0 } ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/FileIO/LoadAppsFromFile.ps1
PowerShell
mit
45,465
master
1,656
# Returns list of apps from the specified file, it trims the app names and removes any comments function LoadAppsFromFile { param ( $appsFilePath ) $appsList = @() if (-not (Test-Path $appsFilePath)) { return $appsList } try { # Check if file is JSON or text format ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/FileIO/LoadAppsDetailsFromJson.ps1
PowerShell
mit
45,465
master
2,250
# Read Apps.json and return list of app objects with optional filtering function LoadAppsDetailsFromJson { param ( [switch]$OnlyInstalled, [string]$InstalledList = "", [switch]$InitialCheckedFromJson ) $apps = @() try { $jsonContent = Get-Content -Path $script:AppsListFi...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/FileIO/SaveCustomAppsListToFile.ps1
PowerShell
mit
45,465
master
452
# Saves the provided appsList to the CustomAppsList file function SaveCustomAppsListToFile { param ( $appsList ) $script:SelectedApps = $appsList # Create file that stores selected apps if it doesn't exist if (-not (Test-Path $script:CustomAppsListFilePath)) { $null = New-Item $scr...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/FileIO/LoadJsonFile.ps1
PowerShell
mit
45,465
master
997
# Loads a JSON file from the specified path and returns the parsed object # Returns $null if the file doesn't exist or if parsing fails function LoadJsonFile { param ( [string]$filePath, [string]$expectedVersion = $null, [switch]$optionalFile ) if (-not (Test-Path $filePath)) { ...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/FileIO/LoadSettings.ps1
PowerShell
mit
45,465
master
1,160
# Loads settings from a JSON file and adds them to script params function LoadSettings { param ( [string]$filePath, [string]$expectedVersion = "1.0" ) $settingsJson = LoadJsonFile -filePath $filePath -expectedVersion $expectedVersion if (-not $settingsJson -or -not $settingsJso...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/FileIO/SaveSettings.ps1
PowerShell
mit
45,465
master
699
# Saves the current settings, excluding control parameters, to 'LastUsedSettings.json' file function SaveSettings { $settings = @{ "Version" = "1.0" "Settings" = @() } foreach ($param in $script:Params.Keys) { if ($script:ControlParams -notcontains $param) { $value =...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/FileIO/SaveToFile.ps1
PowerShell
mit
45,465
master
422
# Saves configuration JSON to a file. # Returns $true on success, $false on failure. function SaveToFile { param ( [Parameter(Mandatory=$true)] [hashtable]$Config, [Parameter(Mandatory=$true)] [string]$FilePath ) try { $Config | ConvertTo-Json -Depth 10 | Set-Conten...
github
Raphire/Win11Debloat
https://github.com/Raphire/Win11Debloat
Scripts/FileIO/LoadAppPresetsFromJson.ps1
PowerShell
mit
45,465
master
604
# Read Apps.json and return the list of preset objects (Name + AppIds). # Returns an empty array if the file cannot be read or contains no presets. function LoadAppPresetsFromJson { try { $jsonContent = Get-Content -Path $script:AppsListFilePath -Raw | ConvertFrom-Json } catch { Write-Warnin...