arcadesdude / BRU

Bloatware Removal Utility, for automating removal of pre-installed, factory bloatware from devices running Windows 7-10 and newer. Silently removes items selected if possible. Preselects common bloatware. Can remove Win10 UWP/Metro/Modern/Windows Store apps and provisioned apps.
MIT License
497 stars 31 forks source link

Question about -include option #10

Closed bsun312 closed 3 years ago

bsun312 commented 3 years ago

Hello,

I'm trying to uninstall all office 365 apps as well as all apps with "Dell" in the name. I am using the below command but im not sure im getting the expressions correct...

Bloatware-Removal-Utility.ps1 -silent -nd -nr -include '"365\ .*|Dell\ .*"'

Could you let me know what my -include should look like ?

Thanks.

arcadesdude commented 3 years ago

The \ (backslash space) is targeting a space there. You can take it out.

-include '"365.*|Dell.*"'

When you use the above does it find what you want? You can also add -dr to the command to not actually remove anything so you can tweak your regular expression.

bsun312 commented 3 years ago

That does exactly what I needed. Thank you. The backslash makes sense. What does the "." (period) do ?

arcadesdude commented 3 years ago

Great! The . in regular expressions means any single character including whitespace. If you put a after a . in a regular expression like . it means any any characters including whitespace zero or more times. The * means zero or more of the preceding '.' (any char).