Browse Source

Minor changes

pull/619/head
Dmitry Nefedov 4 months ago
parent
commit
d40e37f8e5
  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. 4
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  6. 4
      src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1
  7. 4
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

4
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -6720,7 +6720,8 @@ function NetworkAdaptersSavePower
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
# Checking whether there's an adapter that has AllowComputerToTurnOffDevice property to manage
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
# We need also check for adapter status per some laptops have many equal adapters records in adapters list
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress -and ($_.Status -eq "Up")} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
if (-not $Adapters)
{
Write-Information -MessageData "" -InformationAction Continue
@ -15338,6 +15339,7 @@ public static void PostMessage()
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
Write-Verbose -Message "https://ko-fi.com/Q5Q51QUJC" -Verbose
Write-Verbose -Message "https://boosty.to/sophiascript" -Verbose
Write-Information -MessageData "" -InformationAction Continue
}
#endregion Post Actions

4
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -5312,7 +5312,8 @@ function NetworkAdaptersSavePower
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
# Checking whether there's an adapter that has AllowComputerToTurnOffDevice property to manage
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
# We need also check for adapter status per some laptops have many equal adapters records in adapters list
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress -and ($_.Status -eq "Up")} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
if (-not $Adapters)
{
Write-Information -MessageData "" -InformationAction Continue
@ -11794,6 +11795,7 @@ public static void PostMessage()
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
Write-Verbose -Message "https://ko-fi.com/Q5Q51QUJC" -Verbose
Write-Verbose -Message "https://boosty.to/sophiascript" -Verbose
Write-Information -MessageData "" -InformationAction Continue
}
#endregion Post Actions

4
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -5710,7 +5710,8 @@ function NetworkAdaptersSavePower
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
# Checking whether there's an adapter that has AllowComputerToTurnOffDevice property to manage
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
# We need also check for adapter status per some laptops have many equal adapters records in adapters list
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress -and ($_.Status -eq "Up")} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
if (-not $Adapters)
{
Write-Information -MessageData "" -InformationAction Continue
@ -13159,6 +13160,7 @@ public static void PostMessage()
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
Write-Verbose -Message "https://ko-fi.com/Q5Q51QUJC" -Verbose
Write-Verbose -Message "https://boosty.to/sophiascript" -Verbose
Write-Information -MessageData "" -InformationAction Continue
}
#endregion Post Actions

4
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -6740,7 +6740,8 @@ function NetworkAdaptersSavePower
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
# Checking whether there's an adapter that has AllowComputerToTurnOffDevice property to manage
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
# We need also check for adapter status per some laptops have many equal adapters records in adapters list
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress -and ($_.Status -eq "Up")} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
if (-not $Adapters)
{
Write-Information -MessageData "" -InformationAction Continue
@ -15368,6 +15369,7 @@ public static void PostMessage()
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
Write-Verbose -Message "https://ko-fi.com/Q5Q51QUJC" -Verbose
Write-Verbose -Message "https://boosty.to/sophiascript" -Verbose
Write-Information -MessageData "" -InformationAction Continue
}
#endregion Post Actions

4
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -6438,7 +6438,8 @@ function NetworkAdaptersSavePower
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
# Checking whether there's an adapter that has AllowComputerToTurnOffDevice property to manage
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
# We need also check for adapter status per some laptops have many equal adapters records in adapters list
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress -and ($_.Status -eq "Up")} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
if (-not $Adapters)
{
Write-Information -MessageData "" -InformationAction Continue
@ -14322,6 +14323,7 @@ public static void PostMessage()
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
Write-Verbose -Message "https://ko-fi.com/Q5Q51QUJC" -Verbose
Write-Verbose -Message "https://boosty.to/sophiascript" -Verbose
Write-Information -MessageData "" -InformationAction Continue
}
#endregion Post Actions

4
src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1

@ -5966,7 +5966,8 @@ function NetworkAdaptersSavePower
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
# Checking whether there's an adapter that has AllowComputerToTurnOffDevice property to manage
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
# We need also check for adapter status per some laptops have many equal adapters records in adapters list
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress -and ($_.Status -eq "Up")} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
if (-not $Adapters)
{
Write-Information -MessageData "" -InformationAction Continue
@ -13151,6 +13152,7 @@ public static void PostMessage()
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
Write-Verbose -Message "https://ko-fi.com/Q5Q51QUJC" -Verbose
Write-Verbose -Message "https://boosty.to/sophiascript" -Verbose
Write-Information -MessageData "" -InformationAction Continue
}
#endregion Post Actions

4
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -6458,7 +6458,8 @@ function NetworkAdaptersSavePower
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
# Checking whether there's an adapter that has AllowComputerToTurnOffDevice property to manage
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
# We need also check for adapter status per some laptops have many equal adapters records in adapters list
$Adapters = Get-NetAdapter -Physical | Where-Object -FilterScript {$_.MacAddress -and ($_.Status -eq "Up")} | Get-NetAdapterPowerManagement | Where-Object -FilterScript {$_.AllowComputerToTurnOffDevice -ne "Unsupported"}
if (-not $Adapters)
{
Write-Information -MessageData "" -InformationAction Continue
@ -14352,6 +14353,7 @@ public static void PostMessage()
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
Write-Verbose -Message "https://ko-fi.com/Q5Q51QUJC" -Verbose
Write-Verbose -Message "https://boosty.to/sophiascript" -Verbose
Write-Information -MessageData "" -InformationAction Continue
}
#endregion Post Actions

Loading…
Cancel
Save