Create shortcuts in taskbar and start menu on Windows 10 via ConfigMgr

Target: Easily create shortcuts in taskbar and start menu on Windows 10 Professional

I wanted to create a few shortcuts in the taskbar and in the start menu on a few Windows 10 Professional devices.

As we cannot manage the shortcuts with the Windows 10 Professional version – I searched for a solution to manage it via an ConfigMgr package. I found a version of the already known PinTo application which had worked in Windows 7. The new version v2 works also in Windows 10 and the handling is realy easy.

The Sources for the Pinto10v2.exe can be downloaded here / created by Stuart Pearson:

https://www.dropbox.com/s/q4joxy231hz0klj/PinTo10v2_1.1.zip?dl=1

The program is very easy to use - see the syntax below:

Syntax: PinTo10v2 [/pintb | /unpintb | /pinsm | /unpinsm] 'filename'

pintb   = Pin to the Task Bar

unpintb = Unpin from the Task Bar

pinsm   = Pin to the Start Menu

unpinsm = Unpin from the Start Menu

Examples:

Pin powershell.exe to taskbar:

PinTo10v2.exe /pinsm "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"

Unpin powershell.exe from taskbar:

PinTo10v2.exe /pintb "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"

Pin powershell.exe to start menu:

PinTo10v2.exe /pinsm "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"

Unpin powershell.exe to start menu:

PinTo10v2.exe /pinsm "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"

In this post I’ll explain how to create a shortcut in the taskbar & start menu for Powershell and Internet Explorer.

First copy the PinTo10v2.exe in a folder and create a .cmd file with the required syntax of the Pinto10v2.exe:

1

2

Afterwards I created a package that runs in hidden mode:

3

Distribute the package afterwards to the required distribution-points. And deploy the package to the required collection.

In my case everything went smooth – start menu and taskbar before:

4

Start menu and taskbar afterwards:

5

The PinTo10v2.exe can also be used in powershell-script / for example in the App Deployment Toolkit.

Copy smsts.log automatically on a network share if error in OSD

Target: Copy the smsts.log to a network share during a task-sequence if there is any error in the task-sequence / except the option “Continue on error” is set.

Sometimes it can be hard if you request an smsts.log from a location where you don’t have real IT on side.
You need to know at which step the installation process stopped. During OSD, if the disk is already partitioned, within Windows or before, if it’s a x64 system or x86….

There is the possability to copy the logs automatically to a network share. I exported the example Task-Sequence which can be downloaded here: Download

You only need to copy the .zip file on an network share and import the task-sequence in the ConfigMgr Console.

The example Task-Sequence includes the following steps:

This will do the following if you have an error in the task-sequence.

On the file-share you will have a folder with the device name:

And inside the folder the smsts.log:

All steps more detailed:

In my productive TS all steps are one level / folder under the “Task Sequence” step:

Steps:

1. Log Capture:

Options of this step:

2. Connect to Network Folder / create a network-share before with everyone at least write access.

3. Create folder on the share for Computer

4. Copy the smsts.log to the share directory

5. Display a Popup that there was an error and you need to check the logs.

Error message during failure in OSD:

I found the source / Idea on the following Blog-Post: https://systemcenterguru.wordpress.com/2013/11/02/capturing-task-sequence-log-files-during-osd-deployment/

PowerBI SCCM Dashboard – Installation

Target: Create a simple SCCM Dashboard to view the Update-Compliance and Client-health.

Download the Dashboard from the following Link:

https://powerbi.microsoft.com/de-de/solution-templates/sccm/

This will guide you through the setup – you need to specify a user which has read access on the CM-Database and a destination SQL-Database / Azure. At the end you need to download the report:

1.png

To open the file you need to install the Power BI Desktop which is free:

https://powerbi.microsoft.com/de-de/desktop/

All you need to do than is to click on Refresh in the main menu. The report can than be published with the team if you have a PowerBI Pro license / 60 day free trial.

In my case everything went smooth – without any error – and the dashboard is realy good to detect if your clients are healhy:

23

Import “dynamic” start-menu during OSD SCCM

We had the need to import two different start-menus.

One which includes the Office Shortcuts and one without.

But this method you can also use to build your required “dynamic” start layout in Windows 10.

With MS Office installed:

dyn1

Without:

dyn2

The first step is that you export the two start-layouts with the following command:

export-startlayout –path <path><file name>.xml

https://docs.microsoft.com/en-us/windows/configuration/customize-and-export-start-layout

Name it for example:

Start_with_office.xml

And:

Start_without_office.xml

Afterwards create a small powershell script – the scripts copys the IE11 .Ink file and checks if Office 2013 (Office15)

is installed / if yes the start-layout with the Office Icons will be imported if not the default without Office will

be imported.

dyn3

To Import the IE11 Icon again -> you need to copy also the IE.ink file to the destination.

In the package place now the Internet Explorer.Ink file plus the two .xml Layouts and the powershell script:

dyn4

Distribute the package to the required DP’s and you can run the import during the task-sequence:

2017-08-27 16_10_49-Import _dynamic_ start-menu during OSD SCCM - OneNote

Remove built in apps in Windows 10 Professional including Feedback, Support

Target: Remove all Built in apps from Windows 10 for example XBOX

I used the Script from Andre Picker- that can be found on technet:

https://gallery.technet.microsoft.com/Removing-Built-in-apps-65dc387b

Copy the WIM-file of your Windows 10 to an Windows 10 computer.

Start a command-line as administrator and run the script:

C:\win10_en> .\removeapps.ps1 -pathtowim .\PROD_Win10x64en.wim -selectapps $true -index 2

In my case we remove all apps except the ones marked in green:

Remove the following Built-in apps:

Do you really want to delete the following App: Microsoft.3DBuilder (Y/N): y

Delete: Microsoft.3DBuilder

Do you really want to delete the following App: Microsoft.Appconnector (Y/N): y

Delete: Microsoft.Appconnector

Do you really want to delete the following App: Microsoft.BingFinance (Y/N): y

Delete: Microsoft.BingFinance

Do you really want to delete the following App: Microsoft.BingNews (Y/N): y

Delete: Microsoft.BingNews

Do you really want to delete the following App: Microsoft.BingSports (Y/N): y

Delete: Microsoft.BingSports

Do you really want to delete the following App: Microsoft.BingWeather (Y/N): y

Delete: Microsoft.BingWeather

Do you really want to delete the following App: Microsoft.CommsPhone (Y/N): y

Delete: Microsoft.CommsPhone

Do you really want to delete the following App: Microsoft.ConnectivityStore (Y/N): y

Delete: Microsoft.ConnectivityStore

Do you really want to delete the following App: Microsoft.Getstarted (Y/N): y

Delete: Microsoft.Getstarted

Do you really want to delete the following App: Microsoft.Messaging (Y/N): y

Delete: Microsoft.Messaging

Do you really want to delete the following App: Microsoft.MicrosoftOfficeHub (Y/N): y

Delete: Microsoft.MicrosoftOfficeHub

Do you really want to delete the following App: Microsoft.MicrosoftSolitaireCollection (Y/N): y

Delete: Microsoft.MicrosoftSolitaireCollection

Do you really want to delete the following App: Microsoft.Office.OneNote (Y/N): y

Delete: Microsoft.Office.OneNote

Do you really want to delete the following App: Microsoft.Office.Sway (Y/N): y

Delete: Microsoft.Office.Sway

Do you really want to delete the following App: Microsoft.People (Y/N): y

Delete: Microsoft.People

Do you really want to delete the following App: Microsoft.SkypeApp (Y/N): y

Delete: Microsoft.SkypeApp

Do you really want to delete the following App: Microsoft.Windows.Photos (Y/N): n

Skipped: Microsoft.Windows.Photos

Do you really want to delete the following App: Microsoft.WindowsAlarms (Y/N): n

Skipped: Microsoft.WindowsAlarms

Do you really want to delete the following App: Microsoft.WindowsCalculator (Y/N): n

Skipped: Microsoft.WindowsCalculator

Do you really want to delete the following App: Microsoft.WindowsCamera (Y/N): n

Skipped: Microsoft.WindowsCamera

Do you really want to delete the following App: microsoft.windowscommunicationsapps (Y/N): y

Delete: microsoft.windowscommunicationsapps

Do you really want to delete the following App: Microsoft.WindowsMaps (Y/N): y

Delete: Microsoft.WindowsMaps

Do you really want to delete the following App: Microsoft.WindowsPhone (Y/N): y

Delete: Microsoft.WindowsPhone

Do you really want to delete the following App: Microsoft.WindowsSoundRecorder (Y/N): y

Delete: Microsoft.WindowsSoundRecorder

Do you really want to delete the following App: Microsoft.WindowsStore (Y/N): y

Delete: Microsoft.WindowsStore

Do you really want to delete the following App: Microsoft.XboxApp (Y/N): y

Delete: Microsoft.XboxApp

Do you really want to delete the following App: Microsoft.ZuneMusic (Y/N): y

Delete: Microsoft.ZuneMusic

Do you really want to delete the following App: Microsoft.ZuneVideo (Y/N): y

Delete: Microsoft.ZuneVideo

Dismount-WindowsImage…

Please wait…

Remove temporary directory…

Then take the WIM-File / Include it in your caputure or your productive task-sequence.

As we wanted also to remove the Feedback and the Support App we had to use another script. I found a tool “install_wim_tweak.exe” which allows to uninstall some of the default apps which cannot be uninstalled. Like Cortana, Freedback, Support.

The install_wim_tweak.exe utility and the code was created by Legolash2o

During the task-sequence the .cmd file is running:

remove1

Which includes the following two files in an package:

remove2

The .cmd file includes the following:

remove3

Set default file association in windows 10 professional during OSD

Target: Set Internet explorer 11 as default Browser on windows 10 , Set Adobe Reader DC as default PDF-Explorer

On the Windows 10 professional device set your default file applications like you require it:
Afterwards start a command line as administrator and run the following command:
Dism /Online /Export-DefaultAppAssociations:c:\temp\AppAssoc.xml

Opening the xml file you will see that IE11 and Adobe PDF is now the default:

2017-08-27 15_23_19-How To set default file association in windows 10 - Microsoft OneNote

Now copy the AppAssoc.xml on your SCCM-Share and create a package for it / no program required. Distribute the package to the required distribution points.

In my case the package name is “Windows-10-Customizing”:

2017-08-27 15_23_53-How To set default file association in windows 10 - Microsoft OneNote

And the command line to do the import is the following:
Dism.exe /online /Import-DefaultAppAssociations:.\AppAssoc.xml

Then you can run your Windows10 Task-Sequence and you will see that IE11 is now the default web-browser and Adobe PDF the default PDF-Reader.