Browse Source

Fixed typos in UpdateLGPEPolicies

pull/429/head
Dmitry Nefedov 2 years ago
parent
commit
4cd35c9cbe
  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_PowerShell_7/Module/Sophia.psm1

4
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -13663,7 +13663,7 @@ function UpdateLGPEPolicies
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$SplitPath = Split-Path -Path $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "HKLM:") -NoQualifier
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
@ -13686,7 +13686,7 @@ function UpdateLGPEPolicies
}
$Parameters = @{
Scope = "Computer"
Scope = "User"
# e.g. SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
Path = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
Name = $Item.Replace("{}", "")

4
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -10073,7 +10073,7 @@ function UpdateLGPEPolicies
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$SplitPath = Split-Path -Path $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "HKLM:") -NoQualifier
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
@ -10096,7 +10096,7 @@ function UpdateLGPEPolicies
}
$Parameters = @{
Scope = "Computer"
Scope = "User"
# e.g. SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
Path = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
Name = $Item.Replace("{}", "")

4
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -11294,7 +11294,7 @@ function UpdateLGPEPolicies
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$SplitPath = Split-Path -Path $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "HKLM:") -NoQualifier
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
@ -11317,7 +11317,7 @@ function UpdateLGPEPolicies
}
$Parameters = @{
Scope = "Computer"
Scope = "User"
# e.g. SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
Path = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
Name = $Item.Replace("{}", "")

4
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -13703,7 +13703,7 @@ function UpdateLGPEPolicies
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$SplitPath = Split-Path -Path $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "HKLM:") -NoQualifier
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
@ -13726,7 +13726,7 @@ function UpdateLGPEPolicies
}
$Parameters = @{
Scope = "Computer"
Scope = "User"
# e.g. SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
Path = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
Name = $Item.Replace("{}", "")

4
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -13068,7 +13068,7 @@ function UpdateLGPEPolicies
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$SplitPath = Split-Path -Path $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "HKLM:") -NoQualifier
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
@ -13091,7 +13091,7 @@ function UpdateLGPEPolicies
}
$Parameters = @{
Scope = "Computer"
Scope = "User"
# e.g. SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
Path = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
Name = $Item.Replace("{}", "")

4
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -13105,7 +13105,7 @@ function UpdateLGPEPolicies
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$SplitPath = Split-Path -Path $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "HKLM:") -NoQualifier
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
@ -13128,7 +13128,7 @@ function UpdateLGPEPolicies
}
$Parameters = @{
Scope = "Computer"
Scope = "User"
# e.g. SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
Path = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
Name = $Item.Replace("{}", "")

Loading…
Cancel
Save