mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-04 15:00:09 +00:00
Trim Trailing Whitespace
This commit is contained in:
@@ -46,19 +46,19 @@ Function Invoke-WinUtilCurrentSystem {
|
||||
$registryKeys = $sync.configs.tweaks.$Config.registry
|
||||
$scheduledtaskKeys = $sync.configs.tweaks.$Config.scheduledtask
|
||||
$serviceKeys = $sync.configs.tweaks.$Config.service
|
||||
|
||||
|
||||
if($registryKeys -or $scheduledtaskKeys -or $serviceKeys){
|
||||
$Values = @()
|
||||
|
||||
|
||||
Foreach ($tweaks in $registryKeys){
|
||||
Foreach($tweak in $tweaks){
|
||||
|
||||
|
||||
if(test-path $tweak.Path){
|
||||
$actualValue = Get-ItemProperty -Name $tweak.Name -Path $tweak.Path -ErrorAction SilentlyContinue | Select-Object -ExpandProperty $($tweak.Name)
|
||||
$expectedValue = $tweak.Value
|
||||
if ($expectedValue -notlike $actualValue){
|
||||
$values += $False
|
||||
$values += $False
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ Function Invoke-WinUtilCurrentSystem {
|
||||
Foreach ($tweaks in $scheduledtaskKeys){
|
||||
Foreach($tweak in $tweaks){
|
||||
$task = $ScheduledTasks | Where-Object {$($psitem.TaskPath + $psitem.TaskName) -like "\$($tweak.name)"}
|
||||
|
||||
|
||||
if($task){
|
||||
$actualValue = $task.State
|
||||
$expectedValue = $tweak.State
|
||||
@@ -81,7 +81,7 @@ Function Invoke-WinUtilCurrentSystem {
|
||||
Foreach ($tweaks in $serviceKeys){
|
||||
Foreach($tweak in $tweaks){
|
||||
$Service = Get-Service -Name $tweak.Name
|
||||
|
||||
|
||||
if($Service){
|
||||
$actualValue = $Service.StartType
|
||||
$expectedValue = $tweak.StartupType
|
||||
|
||||
Reference in New Issue
Block a user