Skip to content

Commit

Permalink
Populate PlaceHolder comments in functions
Browse files Browse the repository at this point in the history
Files I found that has issues:
Get-WinUtilRegistry.ps1
Install-WinUtilWinget.ps1
Invoke-WinUtilDarkMode.ps1
Remove-WinUtilAPPX.ps1
Test-WinUtilPackageManager.ps1
Update-WinUtilProgramWinget.ps1

Invoke-WPFUpdatessecurity.ps1
  • Loading branch information
Carterpersall committed Oct 3, 2023
1 parent 8077e8a commit 5175cae
Show file tree
Hide file tree
Showing 47 changed files with 334 additions and 198 deletions.
14 changes: 10 additions & 4 deletions functions/private/Get-WinUtilCheckBoxes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ Function Get-WinUtilCheckBoxes {

<#
.DESCRIPTION
Function is meant to find all checkboxes that are checked on the specific tab and input them into a script.
.SYNOPSIS
Finds all checkboxes that are checked on the specific tab and inputs them into a script.
Outputed data will be the names of the checkboxes that were checked
.PARAMETER Group
The group of checkboxes to check
.EXAMPLE
.PARAMETER unCheck
Whether to uncheck the checkboxes that are checked. Defaults to true
.OUTPUTS
A List containing the name of each checked checkbox
.EXAMPLE
Get-WinUtilCheckBoxes "WPFInstall"
#>
Expand Down
14 changes: 10 additions & 4 deletions functions/private/Get-WinUtilInstallerProcess.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
function Get-WinUtilInstallerProcess {
<#
.DESCRIPTION
Meant to check for running processes, will return a boolean response
.SYNOPSIS
Checks if the given process is running
.PARAMETER Process
The process to check
.OUTPUTS
Boolean - True if the process is running
#>

param($Process)
Expand Down
8 changes: 4 additions & 4 deletions functions/private/Get-WinUtilRegistry.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
function Get-WinUtilRegistry {
<#
.DESCRIPTION
.SYNOPSIS
Gets the value of a registry key
.EXAMPLE
.EXAMPLE
Get-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
#>
param (
$Name,
Expand Down
15 changes: 9 additions & 6 deletions functions/private/Get-WinUtilToggleStatus.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
Function Get-WinUtilToggleStatus {
<#
.DESCRIPTION
Pulls the registry keys for a toggle switch and returns true or false
True should mean status is enabled
False should mean status is disabled
.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
#>

Param($ToggleSwitch)
Expand Down
11 changes: 7 additions & 4 deletions functions/private/Get-WinUtilVariables.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
function Get-WinUtilVariables {

<#
.DESCRIPTION
placeholder
.SYNOPSIS
Gets every form object of the provided type
.OUTPUTS
List containing every object that matches the provided type
#>
param (
[Parameter()]
Expand Down
8 changes: 4 additions & 4 deletions functions/private/Install-WinUtilChoco.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function Install-WinUtilChoco {

<#
.DESCRIPTION
Installs Chocolatey if it is not installed
.SYNOPSIS
Installs Chocolatey if it is not already installed
#>

try{
Expand Down
17 changes: 12 additions & 5 deletions functions/private/Install-WinUtilProgramWinget.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
Function Install-WinUtilProgramWinget {

<#
.DESCRIPTION
This will install programs via Winget using a new powershell.exe instance to prevent the GUI from locking up.
Note the triple quotes are required any time you need a " in a normal script block.
.SYNOPSIS
Manages the provided programs using Winget
.PARAMETER ProgramsToInstall
A list of programs to manage
.PARAMETER manage
The action to perform on the programs, can be either 'Installing' or 'Uninstalling'
.NOTES
The triple quotes are required any time you need a " in a normal script block.
#>

param(
Expand Down
10 changes: 5 additions & 5 deletions functions/private/Install-WinUtilWinget.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ function Get-LatestHash {
}

function Install-WinUtilWinget {

<#
.DESCRIPTION
Function is meant to ensure winget is installed
.SYNOPSIS
Installs Winget if it is not already installed
#>
Try{
Write-Host "Checking if Winget is Installed..."
Expand Down
9 changes: 6 additions & 3 deletions functions/private/Invoke-WinUtilBingSearch.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
function Invoke-WinUtilBingSearch {
<#
.DESCRIPTION
.SYNOPSIS
Disables/Enables Bing Search
.PARAMETER Enabled
Indicates whether to enable or disable Bing Search
#>
Param($Enabled)
Try{
Expand Down
7 changes: 3 additions & 4 deletions functions/private/Invoke-WinUtilCurrentSystem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ Function Invoke-WinUtilCurrentSystem {

<#
.DESCRIPTION
Checks to see what tweaks have already been applied, and checks the according boxes
.EXAMPLE
.SYNOPSIS
Checks to see what tweaks have already been applied and what programs are installed, and checks the according boxes
.EXAMPLE
Get-WinUtilCheckBoxes "WPFInstall"
#>
Expand Down
9 changes: 6 additions & 3 deletions functions/private/Invoke-WinUtilDarkMode.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Function Invoke-WinUtilDarkMode {
<#
.DESCRIPTION
.SYNOPSIS
Enables/Disables Dark Mode
.PARAMETER DarkMoveEnabled
Indicates the current dark mode state
#>
Param($DarkMoveEnabled)
Try{
Expand Down
6 changes: 3 additions & 3 deletions functions/private/Invoke-WinUtilFeatureInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
function Invoke-WinUtilFeatureInstall {
<#
.DESCRIPTION
.SYNOPSIS
Converts all the values from the tweaks.json and routes them to the appropriate function
#>

param(
Expand Down
15 changes: 10 additions & 5 deletions functions/private/Invoke-WinUtilScript.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
function Invoke-WinUtilScript {
<#
.DESCRIPTION
Invokes the provided scriptblock. Intended for things that can't be handled with the other functions
.EXAMPLE
.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
$Scriptblock = [scriptblock]::Create({"Write-output 'Hello World'"})
Invoke-WinUtilScript -ScriptBlock $scriptblock -Name "Hello World"
#>
param (
$Name,
Expand Down
14 changes: 10 additions & 4 deletions functions/private/Invoke-WinUtilTweaks.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
function Invoke-WinUtilTweaks {
<#
.DESCRIPTION
Converts all the values from the tweaks.json and routes them to the appropriate function
.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
#>

param(
Expand Down
10 changes: 6 additions & 4 deletions functions/private/Remove-WinUtilAPPX.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
function Remove-WinUtilAPPX {
<#
.DESCRIPTION
.SYNOPSIS
Removes all APPX packages that match the given name
.EXAMPLE
.PARAMETER Name
The name of the APPX package to remove
.EXAMPLE
Remove-WinUtilAPPX -Name "Microsoft.Microsoft3DViewer"
#>
param (
$Name
Expand Down
10 changes: 6 additions & 4 deletions functions/private/Set-WinUtilDNS.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
function Set-WinUtilDNS {
<#
.DESCRIPTION
.SYNOPSIS
Sets the DNS of all interfaces that are in the "Up" state. It will lookup the values from the DNS.Json file
.EXAMPLE
.PARAMETER DNSProvider
The DNS provider to set the DNS server to
.EXAMPLE
Set-WinUtilDNS -DNSProvider "google"
#>
param($DNSProvider)
if($DNSProvider -eq "Default"){return}
Expand Down
21 changes: 16 additions & 5 deletions functions/private/Set-WinUtilRegistry.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
function Set-WinUtilRegistry {
<#
.DESCRIPTION
.SYNOPSIS
Modifies the registry based on the given inputs
.EXAMPLE
.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 value to set the key to
.EXAMPLE
Set-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
#>
#>
param (
$Name,
$Path,
Expand Down
6 changes: 3 additions & 3 deletions functions/private/Set-WinUtilRestorePoint.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function Set-WinUtilRestorePoint {
<#
.DESCRIPTION
.SYNOPSIS
Creates a Restore Point
#>
#>

# Check if the user has administrative privileges
if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Expand Down
13 changes: 9 additions & 4 deletions functions/private/Set-WinUtilScheduledTask.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
function Set-WinUtilScheduledTask {
<#
.DESCRIPTION
.SYNOPSIS
Enables/Disables the provided Scheduled Task
.EXAMPLE
.PARAMETER Name
The path to the Scheduled Task
.PARAMETER State
The State to set the Task to
.EXAMPLE
Set-WinUtilScheduledTask -Name "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -State "Disabled"
#>
param (
$Name,
Expand Down
17 changes: 11 additions & 6 deletions functions/private/Set-WinUtilService.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
Function Set-WinUtilService {
<#
.DESCRIPTION
Changes the startup type of services and starts/stops them as needed
.EXAMPLE
.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" -StartupType "Manual"
#>
#>
param (
$Name,
$StartupType
Expand Down
Loading

0 comments on commit 5175cae

Please sign in to comment.