Loading...

Managing the Advanced configurations node in MDT with PowerShell

Reply A+ A-

In this post, I will show you how to use the advanced configurations node from a Deployment Share using PowerShell.

Managing selection profiles 

What is a Selection profile ?

The selection Profiles node allows you to manage easily your Deployment Share items: Applications, Drivers, Operating Systems, Packages or Task Sequences.
By default the six profiles below are available.  
Default Selection profiles
As you will likely understand seeing the comments part, these profiles will be used to gather items.
The first one All Drivers will gather all driver folders that have been created in the Out-of-Box Drivers node.
In the screenshot below my Out-of-Box Drivers node is composed of three folders which will contain different drivers.
Out-of-Box Drivers node
Selection profiles can be created to include whatever you want. As instance, we can create a PE Drivers selection profile that will contain PE Drivers from the Out-of-Box node.
Then we can use it as Windows PE drivers in the Deployment Share properties.
Deployment Share - Windows PE properties
You can also create a Windows 10 profile to gather, for example, Windows 10 OS, applications, Drivers
Windows 10 selection profile

Add a Selection profile with PowerShell

The PowerShell cmdlet used to add a selection profile is new-item.
The next script allows you to create a selection profile with the following informations.
- Profile name: Windows 10 profile 
- Folders that should be included
  • Applications 
  • Operating Systems
  • Out-of-Box Drivers
Remove a Selection profile with PowerShell 

Selection profile can be removed from a Deployment Share using the PowerShell cmdlet remove-item.



Managing Linked Deployment Share

The Linked Deployment Share node allows you to synchronize a Deployment Share with another. As instance we’ll use a “Master” Deployment Share that will be the main Deployment point.
A target Deployment Share located on another computer will be linked to the first one.
This way you can share a deploy content between two Deployment Shares.

MDT and ADK are not mandatory on the target computer to create a linked Deployment Share. However, in this case you have to create and share a folder that will contain content of a basic Deployment Share folder.

Note: Make sure that both Deployment Shares use the same MDT versions.
You can create a linked Deployment Share, through the New Linked Deployment Share Wizard.
To that end you need to specify the linked deployment share UNC path, which should be UNC path of your target computer. You can also specify a selection profile that we’ve seen previously.
Let’s select the Windows 10 selection profile previously created. 
Linked Deployment Shares - General Settings
Looking at the target Deployment Share we notice that nothing happened on the target deployment share. 
To make our main deployment share available on the target computer, we need to replicate content.
To do this, just do a right-click on your linked DS from your main DS and select Replicate Content. 
Linked Deployment Shares - Replicate content
Note that this part needs some time to complete.
Now looking at our target DS we can see that our Windows 10 profile have been correctly replicate from the main DS.
Target Deployment Share after replication

Add a linked DeploymentShare with PowerShell

To add a linked Deployment Share we’ll use the same cmdlet as for adding a selection profile.

The next sample script will (a) Load the MDT module; (b) create a PSDrive mapped to the deployment Share and create a linked deployment Share.

See below available properties in our linked deployment share, previously created and corresponding with the above switches. 
Linked Deployment Share Properties

Remove a linked DeploymentShare with PowerShell

As mentioned in the previous part, the PowerShell cmdlet to use to remove a linked deployment share is remove-item.


Replicate content with PowerShell

As we have seen in the first part, if you want to add content from your main deployment Share to the target Deployment Share you need to replicate content.
PowerShell allows you to automate this task using the cmdlet Update-MDTLinkedDS.

The below script, provided by the View Script button, allows you to replicate content to the linked deployment share.



Managing a media 

What is a Media ?

The media part of the Advanced Configuration node allows you to create a deploy content for USB stick or DVD.
With the help of the New media Wizard, select a folder that will contain the deploy content and specify a selection profile.
New Media Wizard
Note: As for a Deployment Share when you modify something in the boot image, you’ll need to update the media content.

Create a media with PowerShell

The next sample script will be used to create a media. It’s composed of five parts:
PowerShell script - Create media process

Update media content with PowerShell

The PowerShell cmdlet used to update media content is Update-MDTMedia.
The update media content works as the Update deployment share part.
The following script is this one available by clicking on the View Script button when you update a media.



series_PSMDT 4566382506709442438

Enregistrer un commentaire

Accueil item

Award

Learn KQL in one month

Sponsors

You want to support me ?

Mes articles en français

Books in French


Stats