From 62a5eeecedf53c196171fb588d6b727b54073719 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Fri, 16 Dec 2022 15:04:49 +0300 Subject: [PATCH] Improved UpdateLGPEPolicies --- src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 | 4 ++++ src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 | 3 +++ src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 | 4 ++++ .../Module/Sophia.psm1 | 4 ++++ src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 | 4 ++++ .../Module/Sophia.psm1 | 4 ++++ 6 files changed, 23 insertions(+) diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index 1ec94425..9fb10315 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -13599,6 +13599,10 @@ function UpdateLGPEPolicies return } + Get-Partition | Where-Object -FilterScript{$_. DriveLetter -eq "C"} | Get-Disk | Get-PhysicalDisk | ForEach-Object -Process { + Write-Verbose -Message ([string]($_.FriendlyName, '|', $_.MediaType, '|' ,$_.BusType)) -Verbose + } + Write-Verbose -Message $Localization.Patient -Verbose Write-Verbose -Message $Localization.GPOUpdate -Verbose Write-Verbose -Message HKLM -Verbose diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 index d3922f91..79859d6f 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 @@ -10021,6 +10021,9 @@ function UpdateLGPEPolicies { return } + Get-Partition | Where-Object -FilterScript{$_. DriveLetter -eq "C"} | Get-Disk | Get-PhysicalDisk | ForEach-Object -Process { + Write-Verbose -Message ([string]($_.FriendlyName, '|', $_.MediaType, '|' ,$_.BusType)) -Verbose + } Write-Verbose -Message $Localization.Patient -Verbose Write-Verbose -Message $Localization.GPOUpdate -Verbose diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 index 5071c54f..e48d4c7b 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 @@ -11243,6 +11243,10 @@ function UpdateLGPEPolicies return } + Get-Partition | Where-Object -FilterScript{$_. DriveLetter -eq "C"} | Get-Disk | Get-PhysicalDisk | ForEach-Object -Process { + Write-Verbose -Message ([string]($_.FriendlyName, '|', $_.MediaType, '|' ,$_.BusType)) -Verbose + } + Write-Verbose -Message $Localization.Patient -Verbose Write-Verbose -Message $Localization.GPOUpdate -Verbose Write-Verbose -Message HKLM -Verbose diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 index 630dd918..0b63085d 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 @@ -13629,6 +13629,10 @@ function UpdateLGPEPolicies return } + Get-Partition | Where-Object -FilterScript{$_. DriveLetter -eq "C"} | Get-Disk | Get-PhysicalDisk | ForEach-Object -Process { + Write-Verbose -Message ([string]($_.FriendlyName, '|', $_.MediaType, '|' ,$_.BusType)) -Verbose + } + Write-Verbose -Message $Localization.Patient -Verbose Write-Verbose -Message $Localization.GPOUpdate -Verbose Write-Verbose -Message HKLM -Verbose diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index 3aa845d3..c5bc5638 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -12947,6 +12947,10 @@ function UpdateLGPEPolicies return } + Get-Partition | Where-Object -FilterScript{$_. DriveLetter -eq "C"} | Get-Disk | Get-PhysicalDisk | ForEach-Object -Process { + Write-Verbose -Message ([string]($_.FriendlyName, '|', $_.MediaType, '|' ,$_.BusType)) -Verbose + } + Write-Verbose -Message $Localization.Patient -Verbose Write-Verbose -Message $Localization.GPOUpdate -Verbose Write-Verbose -Message HKLM -Verbose diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 index 14ffb8bd..2372f81a 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 @@ -12974,6 +12974,10 @@ function UpdateLGPEPolicies return } + Get-Partition | Where-Object -FilterScript{$_. DriveLetter -eq "C"} | Get-Disk | Get-PhysicalDisk | ForEach-Object -Process { + Write-Verbose -Message ([string]($_.FriendlyName, '|', $_.MediaType, '|' ,$_.BusType)) -Verbose + } + Write-Verbose -Message $Localization.Patient -Verbose Write-Verbose -Message $Localization.GPOUpdate -Verbose Write-Verbose -Message HKLM -Verbose