Windows 10: How to automatically (cmd/powershell script) unpin all apps in start

Discus and support How to automatically (cmd/powershell script) unpin all apps in start in Windows 10 Customization to solve the problem; i followed this & got everything off but whats shown in the picture below. could you help with a script that would remove the listed tiles & set a... Discussion in 'Windows 10 Customization' started by proguru, Sep 2, 2015.

  1. How to automatically (cmd/powershell script) unpin all apps in start


    i followed this & got everything off but whats shown in the picture below. could you help with a script that would remove the listed tiles & set a default wallpaper?


    How to automatically (cmd/powershell script) unpin all apps in start [​IMG]
     
    irrefutable14, Dec 20, 2016
    #16
  2. GeneralG Win User

    I found very similar results when using the powershell suggested by this thread. Firstly, if this is an image I'd highly recommend using a clean version of Win10. It looks like you are using the OEM version that came on a machine, this could be part of your problem. With the 1607 update, Microsoft now provides an easy way to install a clean copy of Windows:

    How to use 'Refresh Windows' to do a clean install of Windows 10 Anniversary Update | Windows Central

    Secondly, try altering the DefaultLayouts.xml as I suggested earlier in the thread.

    I still have yet to figure out how to get ride of those three tiles, but I've learned to live with it and just remove them by hand.

    The only problem with this solution is that it only applies when new users are created. You may have to go into your image (either online or offline) and directly alter the DefaultLayouts.xml file, rather than running an "after-the-fact" script. My saying: if it can be done in the image, do it in the image. Otherwise, use a script.
     
    GeneralG, Dec 29, 2016
    #17
  3. I have over400 tablets to update to windows 10. They are acer w4-820. I'm not using a clean install I'm simply updating. So manually removing over 10+ tiles and setting a default wallpaper & re-pinning tiles is very time consuming. I've used the script from the prior post to remove the basics but skype & a couple of games along with the arrows are remaining. This is whats left of the default layout after.

    The problem with sending a image is that the don't belong to a domain "windows 8 environment with no GP"

    <LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
    <LayoutOptions StartTileGroupCellWidth="8" />
    <DefaultLayoutOverride>
    <StartLayoutCollection>
    <defaultlayout:StartLayout GroupCellWidth="8" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout">
    <start:Group Name="Life at a glance" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout1.2" DisplayName=" " Size="2x2" Column="4" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout1.3" DisplayName=" " Size="2x2" Column="6" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.1" DisplayName=" " Size="2x2" Column="6" Row="2" Arguments="creative-ms:default?p=DefaultStartLayout2&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo2.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    </start:Group>
    <start:Group Name="Play and explore" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout1.4" DisplayName=" " Size="2x2" Column="0" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.2" DisplayName=" " Size="2x2" Column="4" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout2&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo2.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.3" DisplayName=" " Size="2x2" Column="6" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout2&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo2.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout1.5" DisplayName=" " Size="2x2" Column="0" Row="2" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.4" DisplayName=" " Size="2x2" Column="4" Row="2" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.5" DisplayName=" " Size="2x2" Column="6" Row="2" Arguments="creative-ms:default?p=DefaultStartLayout2&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo2.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.6" DisplayName=" " Size="2x2" Column="0" Row="4" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    </start:Group>
    </defaultlayout:StartLayout>
    </StartLayoutCollection>
    </DefaultLayoutOverride>
    </LayoutModificationTemplate>
    ?Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager]
    ;0 = No Disable
    ;1 = Yes Enable (Default)
    "PreInstalledAppsEnabled"=dword:00000000
     
    irrefutable14, Jan 1, 2017
    #18
  4. GeneralG Win User

    How to automatically (cmd/powershell script) unpin all apps in start

    Whether or not you are in a domain environment shouldn't effect your ability to use a custom image. Not to get into an argument about the benefits of imaging, but updating 400 tablets by hand sounds much more time consuming than building an image that works exactly how you want even if you have to push it to each tablet individually.

    Regardless, if you are dead set on simply updating the tablet, rather than re-imaging, there's only one other thing I can think of:

    Maybe you could do a batch that replaces the "DefaultLayouts.xml" and then creates a new user. Here's the clean "DefaultLayouts.xml" what I used in my image:

    Code: <?xml version="1.0" encoding="utf-8"?> <FullDefaultLayoutTemplate xmlns="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1"> <StartLayoutCollection> <!-- 8 cell wide Desktop layout with Preinstalled apps --> <StartLayout GroupCellWidth="8" PreInstalledAppsEnabled="false"> <start:Group LocalizedNameResourceTag="TileGrid_DefaultGroup1"> </start:Group> <start:Group LocalizedNameResourceTag="TileGrid_DefaultGroup2"> </start:Group> </StartLayout> </StartLayoutCollection>[/quote] Of course, this doesn't apply to any existing users, so after replacing the file, you'll have to create a new user. The batch would be super simple, I'm thinking would look something like this:

    Code: copy <pathTOcleanXML>\DefaultLayouts.xml C:\Users\Default\AppData\Local\Microsoft\Windows\Shell net user <newusername> <password>[/quote] You may need to include some switch on the "copy" command to force overwrite, or you may need to use "xcopy" instead. Also, you could do a "net user <name> /delete" to remove the old user profile if you so desire.

    This all assumes that you are not attached to the current user profile on the tablets. As far as I know, there is no easy way to remove ALL the tiles for existing user profiles. In summary, the powershell script suggested by this thread doesn't get all of the tiles due to Microsoft's strange fascination with forcing "apps" down people throats. Meanwhile, the DefaultLayouts and LayoutModifcation methods only apply to new users or users included in an image, i.e. the default admin (and to be sure, these still leave 2-3 tiles in existence).

    Anyways, good luck with those tablets, they're always the absolute worst to manage.
     
    GeneralG, Jan 2, 2017
    #19
  5. TMC
    tmc Win User
    This is a great fine - for me!

    Windows 10 bug bare of mine is having to remove ALL Start Menu Tiles and had finally found a script for this *Smile but still had to add the required Tiles for my users and your post has helped complete that *Smile

    Here's a copy of my code in current raw state!;
    $getstring = @' [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern IntPtr GetModuleHandle(string lpModuleName); [DllImport("user32.dll", CharSet = CharSet.Auto)] internal static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); public static string GetString(uint strId) { IntPtr intPtr = GetModuleHandle("shell32.dll"); StringBuilder sb = new StringBuilder(255); LoadString(intPtr, strId, sb, sb.Capacity); return sb.ToString(); }'@$getstring = Add-Type $getstring -PassThru -Name GetStr -Using System.Text$unpinFromStart = $getstring[0]::GetString(51394)(New-Object -Com Shell.Application).NameSpace("shell:::{4234d49b-0245-4df3-b780-3893943456e1}").Items() | ForEach { $_.Verbs() | Where {$_.Name -eq $unpinFromStart} | ForEach {$_.DoIt()}}Import-module -Name C:\\software\startmenu\legacy\PinItemToStartMenu -Verbose$itemPath ="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Outlook 2016.lnk"$Shell = New-Object -ComObject Shell.Application$Desktop = $Shell.NameSpace(0X0)$WshShell = New-Object -comObject WScript.Shell$itemName = Split-Path -Path $itemPath -Leaf$ItemLnk = $Desktop.ParseName($itemPath)$ItemVerbs = $ItemLnk.Verbs()Foreach($ItemVerb in $ItemVerbs) { If($ItemVerb.Name.Replace("&","") -match "Pin to Start") { $ItemVerb.DoIt() }}$itemPath ="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Word 2016.lnk"$Shell = New-Object -ComObject Shell.Application$Desktop = $Shell.NameSpace(0X0)$WshShell = New-Object -comObject WScript.Shell$itemName = Split-Path -Path $itemPath -Leaf$ItemLnk = $Desktop.ParseName($itemPath)$ItemVerbs = $ItemLnk.Verbs()Foreach($ItemVerb in $ItemVerbs) { If($ItemVerb.Name.Replace("&","") -match "Pin to Start") { $ItemVerb.DoIt() }}$itemPath ="C:\Program Files (x86)\Microsoft Office\root\Office16\excel.exe"$Shell = New-Object -ComObject Shell.Application$Desktop = $Shell.NameSpace(0X0)$WshShell = New-Object -comObject WScript.Shell$itemName = Split-Path -Path $itemPath -Leaf$ItemLnk = $Desktop.ParseName($itemPath)$ItemVerbs = $ItemLnk.Verbs()Foreach($ItemVerb in $ItemVerbs) { If($ItemVerb.Name.Replace("&","") -match "Pin to Start") { $ItemVerb.DoIt() }}$itemPath ="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk"$Shell = New-Object -ComObject Shell.Application$Desktop = $Shell.NameSpace(0X0)$WshShell = New-Object -comObject WScript.Shell$itemName = Split-Path -Path $itemPath -Leaf$ItemLnk = $Desktop.ParseName($itemPath)$ItemVerbs = $ItemLnk.Verbs()Foreach($ItemVerb in $ItemVerbs) { If($ItemVerb.Name.Replace("&","") -match "Pin to Start") { $ItemVerb.DoIt() }}
    Import it and then add what you want with Set-OSCPin as described in the help. If you install this module above you could add them like this (but you'd have to change the path if you don't use Office 2016) Code: Set-OSCPin -Path= ` "C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE", ` "C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE", ` "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE"[/quote] I tested it (as below) and it works for Outlook 2016 on Windows 10 AE - this is just code stripped from the link above to just add Outlook...
    Code:
    $itemPath ="C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE"
     
     $Shell = New-Object -ComObject Shell.Application
     $Desktop = $Shell.NameSpace(0X0)
     $WshShell = New-Object -comObject WScript.Shell
     
     $itemName = Split-Path -Path $itemPath -Leaf
     $ItemLnk = $Desktop.ParseName($itemPath)
     $ItemVerbs = $ItemLnk.Verbs()
     
     Foreach($ItemVerb in $ItemVerbs) {
     If($ItemVerb.Name.Replace("&","") -match "Pin to Start") {
     $ItemVerb.DoIt()
     }
     
Thema:

How to automatically (cmd/powershell script) unpin all apps in start

Loading...
  1. How to automatically (cmd/powershell script) unpin all apps in start - Similar Threads - automatically cmd powershell

  2. Can't start cmd & powershell as admin

    in Windows 10 Gaming
    Can't start cmd & powershell as admin: I can no longer start the cmd and powershell as administrator, even by right-clicking to start it as administrator. I tried to do a disk scan and nothing changed, I tried to contact the assistance and I also did the repair-update and also this time nothing changed. Thank you...
  3. Can't start cmd & powershell as admin

    in Windows 10 Software and Apps
    Can't start cmd & powershell as admin: I can no longer start the cmd and powershell as administrator, even by right-clicking to start it as administrator. I tried to do a disk scan and nothing changed, I tried to contact the assistance and I also did the repair-update and also this time nothing changed. Thank you...
  4. how to connect to Wi-Fi with cmd/powershell script

    in Windows 10 Gaming
    how to connect to Wi-Fi with cmd/powershell script: i'm trying to create command to connect to my Wi-Fi via automation script, however my Wi-Fi demand user name and password to connectWindows Security Login pop up when connecting to wireless NetworkI tried to Add a new wireless profile to the system: netsh wlan add profile...
  5. how to connect to Wi-Fi with cmd/powershell script

    in Windows 10 Software and Apps
    how to connect to Wi-Fi with cmd/powershell script: i'm trying to create command to connect to my Wi-Fi via automation script, however my Wi-Fi demand user name and password to connectWindows Security Login pop up when connecting to wireless NetworkI tried to Add a new wireless profile to the system: netsh wlan add profile...
  6. PowerShell script

    in Windows 10 Support
    PowerShell script: The code below tests a series of IPs in a txt file.The result is as follows and is written in a txt file. 19.191.12.161 - online 19.191.12.162 - offline 19.191.12.163 - offline 19.191.12.164 - offline 19.191.12.165 - offline also see the scrennshot Code: $Output= @()$GetIP =...
  7. powershell script

    in Windows 10 Customization
    powershell script: looking for a script to monitor for a folder, if there is a file in that folder send it as an email, once the email is sent out, confirm and then move the files to an archive folder. monitor c:\test\*.pdf No files, do not send email. Yes Files, send an email to someone at...
  8. Customise OS with PowerShell script to remove ALL Apps.

    in Windows 10 Customization
    Customise OS with PowerShell script to remove ALL Apps.: I have been playing around with customising an Win 10 Pro ISO for installation. I basically want to get rid of pretty much ALL the Apps besides about three. For customisation, I have tried out WinReducer, MSMG, and WinToolkit, all of which allowed various levels of...
  9. How can cmd script check for powershell environment?

    in Windows 10 Support
    How can cmd script check for powershell environment?: I can execute script abc.cmd in either a command prompt or powershell environment/window. Can it determine the environment in which it runs? Powershell 5, W10Pro64, 1803 Thank you and a Merry Christmas. 124044
  10. Can't unpin app from Start

    in Windows 10 Software and Apps
    Can't unpin app from Start: Hello, I can't unpin an app from the Start menu Here's a gif of what (doesn't) happen [img] 12581

Users found this page by searching for:

  1. unpin app from start menu powershell

    ,
  2. syspin to unpin apps cmd

    ,
  3. ms-appx:///experiences/preinstalledapps/defaultsquaretilelogo2.png

    ,
  4. Arguments=creative-ms:default?p=DefaultStartLayout2&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles