
때때로 나는 누군가를 위해 새 PC를 준비하고 powershell을 사용하여 메뉴 시작에서 프로그램과 광고를 고정 해제할 수 있다고 생각했습니다. 효과가 있었지만 부분적으로만 작동했습니다. Calendar & Weather와 같은 프로그램을 고정 해제할 수 있었지만 Asphalt 8: Airborne과 같은 Windows 스토어 게임 광고를 제거하는 방법을 모르겠습니다.
해당 항목(및 유사한 항목)을 고정 해제하려면 스크립트에 어떤 이름을 포함해야 합니까?
내가 사용하는 스크립트는 다음과 같습니다.
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
답변1
표준화된 시작 메뉴를 배포하려면 Export-StartLayout
다음을 사용할 수 있습니다 Import-StartLayout
.
- 테스트 머신의 시작 메뉴를 원하는 대로 수동으로 설정하세요.
- .dll을 사용하여 해당 레이아웃을 XML 파일로 내보냅니다
Export-StartLayout
. - 를 사용하여 다른 컴퓨터에서 해당 파일을 가져옵니다
Import-StartLayout
.
Microsoft의 자세한 내용은 다음과 같습니다.
https://blogs.technet.microsoft.com/deploymentguys/2016/03/07/windows-10-start-layout-customization/
답변2
이는 MDT를 사용하여 Windows 10에 사용자 지정 시작 메뉴 레이아웃을 푸시하기 위해 PowerShell로 작성한 간단한 내용입니다. 배포 중에 임시 폴더에 XML을 배포하는 MDT로 시작됩니다.
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`