
De vez en cuando preparo una nueva PC para alguien y pensé que podía desanclar programas y anuncios del menú y comenzar a usar PowerShell. Funcionó pero sólo en parte. Pude desanclar programas como Calendar & Weather, pero no tengo idea de cómo deshacerme de los anuncios de juegos de Windows Store como Asphalt 8: Airborne:
¿Qué nombre debo incluir en un script para desanclar esa cosa (y similares)?
Aquí está el script que uso:
function Pin-App { param(
[string]$appname,
[switch]$unpin
)
try{
if ($unpin.IsPresent){
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Von "Start" lösen|Unpin from Start'} | %{$_.DoIt()}
return "App '$appname' unpinned from Start"
}else{
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'An "Start" anheften|Pin to Start'} | %{$_.DoIt()}
return "App '$appname' pinned to Start"
}
}catch{
Write-Error "Error Pinning/Unpinning App! (App-Name correct?)"
}
}
Pin-App "Mail" -unpin
Pin-App "Store" -unpin
Pin-App "Calendar" -unpin
Pin-App "Microsoft Edge" -unpin
Pin-App "Photos" -unpin
Pin-App "Cortana" -unpin
Pin-App "Weather" -unpin
Pin-App "Phone Companion" -unpin
Pin-App "Twitter" -unpin
Pin-App "Skype Video" -unpin
Pin-App "Candy Crush Soda Saga" -unpin
Pin-App "xbox" -unpin
Pin-App "Groove music" -unpin
Pin-App "films & tv" -unpin
Pin-App "microsoft solitaire collection" -unpin
Pin-App "money" -unpin
Pin-App "get office" -unpin
Pin-App "onenote" -unpin
Pin-App "news" -unpin
Pin-App "Asphalt 8: Airborne" -unpin
Pin-App "This PC" -pin
Respuesta1
Si desea implementar un menú de inicio estandarizado, puede usar Export-StartLayout
y Import-StartLayout
:
- Configure manualmente el menú de inicio en una máquina de prueba como lo desee.
- Exporte ese diseño a un archivo XML con
Export-StartLayout
. - Importe ese archivo en las otras computadoras con
Import-StartLayout
.
Hay más detalles de Microsoft aquí:
https://blogs.technet.microsoft.com/deploymentguys/2016/03/07/windows-10-start-layout-customization/
Respuesta2
Esto es algo simple que escribí con PowerShell para implementar mi diseño de menú de inicio personalizado en Windows 10 usando MDT. Comienza con MDT implementando el XML en la carpeta temporal durante la implementación.
Clear-Host
# file path that the xml must live in
$filepath = "C:\users\default\AppData\Local\Microsoft\Windows\Shell"
# xml files that were copied to local machine
$startxmlorig = "C:\Windows\Temp\startandtaskbar.xml"
$layoutmod = "C:\Windows\Temp\LayoutModification.xml"
# test the path to see if it exists if yes then copy xmls to correct folder on if not then create the path and copy the xml files to the correct path.
if (!(Test-Path -Path $filepath)) {
Copy-Item -Path $startxmlorig -Destination $filepath
Copy-Item -Path $layoutmod -Destination $filepath
} else {
New-Item -Force -ItemType Directory -Path $filepath
Copy-Item -Path $startxmlorig -Destination $filepath
Copy-Item -Path $layoutmod -Destination $filepath`