andrew-s-taylor / public

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

Add Remove Pinned Store from Taskbar and Dropbox promotion #30

Closed marnold-sysadmin closed 7 months ago

marnold-sysadmin commented 7 months ago

Thoughts on adding to the debloat script.

Remove Pinned Taskbar Microsoft Store

$apps = (New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() $finalname = $null

foreach ($app in $apps) { $appname = $app.Name if ($appname -like "store") { $finalname = $app.Name break # Optional: Break if you only need the first match } }

if ($null -ne $finalname) { $verbs = ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | Where-Object {$.Name -eq $finalname}).Verbs() $unpinVerb = $verbs | Where-Object {$.Name.replace('&','') -match 'Unpin from taskbar'} if ($null -ne $unpinVerb) { $unpinVerb.DoIt() $exec = $true } else { Write-Host "Unpin verb not found for $finalname." } } else { Write-Host "No application matching 'store' found." }

Also there is a Dropbox Promotion that I would see useful to add.

Removing Dropbox Promotion using wildcard for version flexibility

$dropboxPromoPackages = Get-AppxPackage -Name "C27EB4BA.DropboxOEM*" foreach ($pkg in $dropboxPromoPackages) { Remove-AppxPackage -Package $pkg.PackageFullName Write-Host "Removed Dropbox Promotion package: $($pkg.PackageFullName)" }

andrew-s-taylor commented 7 months ago

I don't think the unpin store option will work as the system user?

marnold-sysadmin commented 7 months ago

Yea i think you are correct. My testing didnt work until i ran the script on a user profile not as an admin.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Andrew Taylor @.> Sent: Friday, February 16, 2024 11:57:42 AM To: andrew-s-taylor/public @.> Cc: Matthew Arnold @.>; Author @.> Subject: Re: [andrew-s-taylor/public] Add Remove Pinned Store from Taskbar and Dropbox promotion (Issue #30)

You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

[EXTERNAL EMAIL] This is an EXTERNAL email. Exercise caution. DO NOT open attachments or click links from unknown senders or unexpected email.

I don't think the unpin store option will work as the system user?

— Reply to this email directly, view it on GitHubhttps://github.com/andrew-s-taylor/public/issues/30#issuecomment-1948990538, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZUWQCS27I2HFM7DIED5GBLYT6MZNAVCNFSM6AAAAABDMMPZDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBYHE4TANJTHA. You are receiving this because you authored the thread.Message ID: @.***>

Matthew Arnold System Administrator [https://www.mail-signatures.com/signature-generator/img/templates/simple-yet-informative/fb.png]https://www.facebook.com/MyCompany [https://www.mail-signatures.com/signature-generator/img/templates/simple-yet-informative/tt.png] https://twitter.com/MyCompany404 [https://www.mail-signatures.com/signature-generator/img/templates/simple-yet-informative/yt.png] https://www.youtube.com/user/MyCompanyChannel [https://www.mail-signatures.com/signature-generator/img/templates/simple-yet-informative/ln.png] https://www.linkedin.com/company/mycompany404 [https://www.mail-signatures.com/signature-generator/img/templates/simple-yet-informative/it.png] https://www.instagram.com/mycompany404/ [https://www.mail-signatures.com/signature-generator/img/templates/simple-yet-informative/pt.png] https://pinterest.com/mycompany404/ Mobile: (979) 877 9583 | Phone: (210) 318-3027 @.**@.> Airrosti Rehab Centers, 111 Tower Drive, 78232, U.S.A

Airrosti.comhttp://airrosti.com/

andrew-s-taylor commented 7 months ago

I'll add the wildcard on dropbox though. I add the unpin store as a user script in Intune if it helps

andrew-s-taylor commented 7 months ago

Dropbox added