andrew-s-taylor / public

Public Scripts and Apps
GNU General Public License v3.0
454 stars 172 forks source link

Tested the new Version of RemoveBloat.ps1 #14

Closed maracre closed 1 year ago

maracre commented 1 year ago

Hello,

i tested your new script and we get the following Errors:

 In C:\Temp\RemoveBloat.ps1:209 Zeichen:17
+             Sign up
+                 ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als Teil einer Zeichenfolge zu
übergeben.
In C:\Temp\RemoveBloat.ps1:214 Zeichen:209
+ ... k Button--medium Button d-lg-none color-fg-inherit p-1">    <span cla ...
+                                                                 ~
Der Operator "<" ist für zukünftige Versionen reserviert.
In C:\Temp\RemoveBloat.ps1:237 Zeichen:45
+             <ul class="list-style-none f5" >
+                                             ~
Dateispezifikation nach dem Umleitungsoperator fehlt.
In C:\Temp\RemoveBloat.ps1:435 Zeichen:13
+       CI/CD &amp; Automation
+             ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als Teil einer Zeichenfolge zu
übergeben.
In C:\Temp\RemoveBloat.ps1:494 Zeichen:45
+             <ul class="list-style-none f5" >
+                                             ~
Dateispezifikation nach dem Umleitungsoperator fehlt.
In C:\Temp\RemoveBloat.ps1:509 Zeichen:45
+             <ul class="list-style-none f5" >
+                                             ~
Dateispezifikation nach dem Umleitungsoperator fehlt.
In C:\Temp\RemoveBloat.ps1:1452 Zeichen:96
+ ... ="" data-disable-with="" data-dropdown-tracking="{&quot;type&quot;:&q ...
+                                                                 ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als Teil einer Zeichenfolge zu
übergeben.
In C:\Temp\RemoveBloat.ps1:1452 Zeichen:103
+ ... a-disable-with="" data-dropdown-tracking="{&quot;type&quot;:&quot;blo ...
+                                                                 ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als Teil einer Zeichenfolge zu
übergeben.
In C:\Temp\RemoveBloat.ps1:1452 Zeichen:146
+ ... &quot;type&quot;:&quot;blob_edit_dropdown.more_options_click&quot;,&q ...
+                                                                 ~
Das kaufmännische Und-Zeichen (&) ist nicht zulässig. Der &-Operator ist für eine zukünftige Verwendung reserviert. Verwenden Sie das kaufmännische Und-Zeichen in doppelten Anführungszeichen ("&"), um es als Teil einer Zeichenfolge zu
übergeben.
In C:\Temp\RemoveBloat.ps1:1452 Zeichen:153
+ ... type&quot;:&quot;blob_edit_dropdown.more_options_click&quot;,&quot;co ...
+                                                                  ~
Ausdruck fehlt nach dem unären Operator ",".
Es wurden nicht alle Analysefehler berichtet. Korrigieren Sie die berichteten Fehler, und versuchen Sie es erneut.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : AmpersandNotAllowed

Its tested on a Windows 11 Enterprise Client.

andrew-s-taylor commented 1 year ago

Did you click the Raw button in Github to get the script? It looks like you have some html in there

maracre commented 1 year ago

I tried both, with Raw i got other error messages and i rightclicked in the browser on the script and SaveAs, there i get above mentioned error messages.

andrew-s-taylor commented 1 year ago

Try copying this: https://raw.githubusercontent.com/andrew-s-taylor/public/main/De-Bloat/RemoveBloat.ps1

maracre commented 1 year ago

I tried it with your last suggestion and now we get the following error:

In C:\Temp\RemoveBloat.ps1:130 Zeichen:26

andrew-s-taylor commented 1 year ago

I've just run the script on a fresh Win11 22H2 build with the German language pack activated and it completed without any errors. How are you running the script?

maracre commented 1 year ago

im running the script, without and with admin privilages, in the powershell installed with my pc. My User is a domainuser, with local admin rights.

andrew-s-taylor commented 1 year ago

If you run just this part, what value do you get for $everyone and $builtin? $locale = Get-WinSystemLocale | Select-Object -expandproperty Name

Switch on locale to set variables

Switch on locale to set variables

switch ($locale) { "ar-SA" { $everyone = "الجميع" $builtin = "مدمج" } "bg-BG" { $everyone = "Всички" $builtin = "Вграден" } "cs-CZ" { $everyone = "Všichni" $builtin = "Vestavěný" } "da-DK" { $everyone = "Alle" $builtin = "Indbygget" } "de-DE" { $everyone = "Jeder" $builtin = "Integriert" } "el-GR" { $everyone = "Όλοι" $builtin = "Ενσωματωμένο" } "en-US" { $everyone = "Everyone" $builtin = "Builtin" }
"en-GB" { $everyone = "Everyone" $builtin = "Builtin" } "es-ES" { $everyone = "Todos" $builtin = "Incorporado" } "et-EE" { $everyone = "Kõik" $builtin = "Sisseehitatud" } "fi-FI" { $everyone = "Kaikki" $builtin = "Sisäänrakennettu" } "fr-FR" { $everyone = "Tout le monde" $builtin = "Intégré" } "he-IL" { $everyone = "כולם" $builtin = "מובנה" } "hr-HR" { $everyone = "Svi" $builtin = "Ugrađeni" } "hu-HU" { $everyone = "Mindenki" $builtin = "Beépített" } "it-IT" { $everyone = "Tutti" $builtin = "Incorporato" } "ja-JP" { $everyone = "すべてのユーザー" $builtin = "ビルトイン" } "ko-KR" { $everyone = "모든 사용자" $builtin = "기본 제공" } "lt-LT" { $everyone = "Visi" $builtin = "Įmontuotas" } "lv-LV" { $everyone = "Visi" $builtin = "Iebūvēts" } "nb-NO" { $everyone = "Alle" $builtin = "Innebygd" } "nl-NL" { $everyone = "Iedereen" $builtin = "Ingebouwd" } "pl-PL" { $everyone = "Wszyscy" $builtin = "Wbudowany" } "pt-BR" { $everyone = "Todos" $builtin = "Integrado" } "pt-PT" { $everyone = "Todos" $builtin = "Incorporado" } "ro-RO" { $everyone = "Toată lumea" $builtin = "Incorporat" } "ru-RU" { $everyone = "Все пользователи" $builtin = "Встроенный" } "sk-SK" { $everyone = "Všetci" $builtin = "Vstavaný" } "sl-SI" { $everyone = "Vsi" $builtin = "Vgrajen" } "sr-Latn-RS" { $everyone = "Svi" $builtin = "Ugrađeni" } "sv-SE" { $everyone = "Alla" $builtin = "Inbyggd" } "th-TH" { $everyone = "ทุกคน" $builtin = "ภายในเครื่อง" } "tr-TR" { $everyone = "Herkes" $builtin = "Yerleşik" } "uk-UA" { $everyone = "Всі" $builtin = "Вбудований" } "zh-CN" { $everyone = "所有人" $builtin = "内置" } "zh-TW" { $everyone = "所有人" $builtin = "內建" } default { $everyone = "Everyone" $builtin = "Builtin" } }

maracre commented 1 year ago

when i try it, like you suggested, i get no value back. grafik

andrew-s-taylor commented 1 year ago

You won't, you'll need to ask it what the variables are

maracre commented 1 year ago

When i try it and i type in the Variable $locale it says de-DE.

andrew-s-taylor commented 1 year ago

That part is working then, you may need to step through the script and see which line is failing