Browse Source

Minor changes

master
Dmitry Nefedov 1 year ago
parent
commit
9ebff8ae38
  1. 4
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  2. 4
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  3. 4
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  4. 4
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  5. 5
      src/Sophia_Script_for_Windows_11/Functions.ps1
  6. 4
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  7. 5
      src/Sophia_Script_for_Windows_11_PowerShell_7/Functions.ps1
  8. 4
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

4
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -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]
{
@ -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

4
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -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]
{
@ -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

4
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -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]
{
@ -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

4
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -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]
{
@ -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

5
src/Sophia_Script_for_Windows_11/Functions.ps1

@ -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

4
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -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]
{
@ -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

5
src/Sophia_Script_for_Windows_11_PowerShell_7/Functions.ps1

@ -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

4
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -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]
{
@ -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

Loading…
Cancel
Save