Loading...

Run a Post Configuration Task Sequence once MDT deployment is completed

3 A+ A-
In this post, I will show you a way to add a Post Configuration Task Sequence once your deployment is completed successfully. It will allow you for instance, to configure the computer name, create a user, choose applications to install from your deployment Share after the deployment.
When this can be used ?
Imagine for instance the below behavior:
1 / You have to install a master for remote site
Or
Computers are installed in Preload mode by the vendor.
2 / Once installed, computers have to be sent to each site
3 / Once computers are started you able to choose applications to install

That's why I decided to find different ways to proceed. 
In this post I will show you how to proceed and two differents post config GUI I did.


How to get scripts ?




How to use it ?

Configure your deployment sources

 All following mentioned folders are located in the download link, see below:
Folders in the download link
1 / Create a new application called for instance: Post Configuration GUI
This application contains content from the Post_Config_Application folder you can find in the download link.
The application cmdline is as below:
Post Config GUI cmdline
2 / Copy the SD_Post_Config_Scripts folder in the Deploy folder
3 / Copy the CustomSettings_Post_config.ini located in the INI folder in the Control folder.
4 / Add a new step at the end of your main Task Sequence, to run the script SD_Copy_Deploy_Config.ps1
- Name: [SD] - Copy post config part locally
- Type: Run PowerShell Script
Copy Scripts in the main TS
5 / Create a Post Configuration Task Sequence that will launch the Post-Configuration GUI and install applications if needed. 
Post-Config TS
This task Sequence has for ID: CONFIG
In my example this Task Sequence is composed of the below steps:
Post-Config TS Steps


Run a deployment

1 / Now run a  deployment and run your main installation Task Sequence.
2 / Once deployment is completed successfully click on Finish to restart or restart manually the computer.
3 / Once the computer reboots once of the Post Configuration GUI Task Sequence will be launched automatically, as below:
Post Config with all applications
Post Config with bundle Applications
4 / Type the new computer name, and choose applications to install and click on the Apply changes button.
5 / Your applications will be installed and the computer will reboot. 
7 / Once you logged on again copy scripts and light deployment share will be removed from your computer.
8 / Enjoy


Post Config in action





How it works ?


What does the copy script?

As mentioned above, you first have to copy the Copy PS1 script in the Scripts folder and add a new step in your main TS to run this scripts.

In my example, this script will proceed as below:
1 / Create a folder C:\Deploy_Light_Content.
2 / Copy below folders from the deployment share to the Deploy_Light_Content folder:
- Applications
- Scripts
- Control
- Tools
3 / Copy a the Post Configuration.exe file in your Desktop 
4 / Copy the TS_Delete_Deploy_Config.ps1 file in your temp folder
5 / Create a RunOnce Key in the registry that will launch this EXE at the next reboot.

See below the copy ps1 I used.


What does CONFIG TS?

The Post-Configuration Task Sequence will launch the PowerShell GUI that allows you to change your computer name and choose applications to install.
See below how it's composed.
CONFIG TS steps
The first step Run Post-Configuration GUI launch the Post Configuration GUI application created previously.

The second step is just a simple Install application type, as seen below:

The last step Add Deleting Post-Config files in RunOnce mode, will run the TS_Add_RunOnce_For_Deleting.ps1 script.
This script will create a new runonce registry key to run a deleting script that will remove the C:\Deploy_Light_Content folder and the EXE from the Desktop.

See below the TS_Delete_Deploy_Config.ps1 script



PS1 2142417636889674243

Enregistrer un commentaire

3 commentaires

Anonyme a dit…

Hello,

I would like to know if we can select multiple applications at the same time with the GUI ? thx

Best regard,

Anonyme a dit…

Bonjour,

Plus aucun lien de téléchargement fonctionne.
Auriez-vous une autre possibilité de téléchargement ?
Sur "Docs Microsoft", lien inconnu.

Vous remerciant par avance.

Cordialement

Anonyme a dit…

Hello,

No more download link works.
Do you have another download option?
On "Microsoft Docs", unknown link.

Thanking you in advance.

cordially

Accueil item

Award

Learn KQL in one month

Sponsors

You want to support me ?

Mes articles en français

Books in French


Stats