Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
farag2 committed Dec 14, 2023
1 parent 10f2cc1 commit 9ebff8a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public static string GetString(uint strId)
# Check if Get-WindowsEdition cmdlet is working
try
{
Get-WindowsEdition -Online
[void](Get-WindowsEdition -Online)
}
catch [System.Runtime.InteropServices.COMException]
{
Expand Down Expand Up @@ -1606,7 +1606,7 @@ function ScheduledTasks
# Getting list of all scheduled tasks according to the conditions
$Tasks = Get-ScheduledTask | Where-Object -FilterScript {($_.State -eq $State) -and ($_.TaskName -in $CheckedScheduledTasks)}

if (-not ($Tasks))
if (-not $Tasks)
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.NoData -Verbose
Expand Down
4 changes: 2 additions & 2 deletions src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static string GetString(uint strId)
# Check if Get-WindowsEdition cmdlet is working
try
{
Get-WindowsEdition -Online
[void](Get-WindowsEdition -Online)
}
catch [System.Runtime.InteropServices.COMException]
{
Expand Down Expand Up @@ -1478,7 +1478,7 @@ function ScheduledTasks
# Getting list of all scheduled tasks according to the conditions
$Tasks = Get-ScheduledTask | Where-Object -FilterScript {($_.State -eq $State) -and ($_.TaskName -in $CheckedScheduledTasks)}

if (-not ($Tasks))
if (-not $Tasks)
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.NoData -Verbose
Expand Down
4 changes: 2 additions & 2 deletions src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static string GetString(uint strId)
# Check if Get-WindowsEdition cmdlet is working
try
{
Get-WindowsEdition -Online
[void](Get-WindowsEdition -Online)
}
catch [System.Runtime.InteropServices.COMException]
{
Expand Down Expand Up @@ -1478,7 +1478,7 @@ function ScheduledTasks
# Getting list of all scheduled tasks according to the conditions
$Tasks = Get-ScheduledTask | Where-Object -FilterScript {($_.State -eq $State) -and ($_.TaskName -in $CheckedScheduledTasks)}

if (-not ($Tasks))
if (-not $Tasks)
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.NoData -Verbose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public static string GetString(uint strId)
# Check if Get-WindowsEdition cmdlet is working
try
{
Get-WindowsEdition -Online
[void](Get-WindowsEdition -Online)
}
catch [System.Runtime.InteropServices.COMException]
{
Expand Down Expand Up @@ -1610,7 +1610,7 @@ function ScheduledTasks
# Getting list of all scheduled tasks according to the conditions
$Tasks = Get-ScheduledTask | Where-Object -FilterScript {($_.State -eq $State) -and ($_.TaskName -in $CheckedScheduledTasks)}

if (-not ($Tasks))
if (-not $Tasks)
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.NoData -Verbose
Expand Down
5 changes: 5 additions & 0 deletions src/Sophia_Script_for_Windows_11/Functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ $Parameters = @{
"DNSoverHTTPS -Enable -PrimaryDNS $ValidValue -SecondaryDNS $ValidValueDescending" | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
}
}

"DNSoverHTTPS -Disable" | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
"DNSoverHTTPS -ComssOneDNS" | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}

continue
}

# If a module command is Set-Policy
Expand Down
4 changes: 2 additions & 2 deletions src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public static string GetString(uint strId)
# Check if Get-WindowsEdition cmdlet is working
try
{
Get-WindowsEdition -Online
[void](Get-WindowsEdition -Online)
}
catch [System.Runtime.InteropServices.COMException]
{
Expand Down Expand Up @@ -1602,7 +1602,7 @@ function ScheduledTasks
# Getting list of all scheduled tasks according to the conditions
$Tasks = Get-ScheduledTask | Where-Object -FilterScript {($_.State -eq $State) -and ($_.TaskName -in $CheckedScheduledTasks)}

if (-not ($Tasks))
if (-not $Tasks)
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.NoData -Verbose
Expand Down
5 changes: 5 additions & 0 deletions src/Sophia_Script_for_Windows_11_PowerShell_7/Functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ $Parameters = @{
"DNSoverHTTPS -Enable -PrimaryDNS $ValidValue -SecondaryDNS $ValidValueDescending" | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
}
}

"DNSoverHTTPS -Disable" | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
"DNSoverHTTPS -ComssOneDNS" | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}

continue
}

# If a module command is Set-Policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public static string GetString(uint strId)
# Check if Get-WindowsEdition cmdlet is working
try
{
Get-WindowsEdition -Online
[void](Get-WindowsEdition -Online)
}
catch [System.Runtime.InteropServices.COMException]
{
Expand Down Expand Up @@ -1603,7 +1603,7 @@ function ScheduledTasks
# Getting list of all scheduled tasks according to the conditions
$Tasks = Get-ScheduledTask | Where-Object -FilterScript {($_.State -eq $State) -and ($_.TaskName -in $CheckedScheduledTasks)}

if (-not ($Tasks))
if (-not $Tasks)
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.NoData -Verbose
Expand Down

0 comments on commit 9ebff8a

Please sign in to comment.