Score:0

How to install based on api in mdt?

cn flag

We have an API server which has details based on serial number of laptop/desktop.

Is there any way to check the details of the machine serial number and gather details from API server based on this machine while running the MDT and select the task sequence based on that automatically and install that specific task sequence?

Can anyone please suggest the possibilities and steps to acheive this.

@Elliot, I saw the link you shared, there the powershell task has options to create a ts variable.

powershell task in sccm

But, in mdt, there are limited options as you see.

powershell task in mdt

dz flag
Yes, you can have PowerShell do the checks and set a TS variable by interfacing with the TS subsystem: https://docs.microsoft.com/en-us/mem/configmgr/osd/understand/using-task-sequence-variables#bkmk_run-ps. Even though it is for SCCM, it works in MDT too
Sara June avatar
cn flag
Can you check the details added above
dz flag
If you import the module for task sequences in powershell, you can create a new TS variable inside of powershell via code. You don't have to do it inside of them MDT itself because powershell interfaces with the task sequence subsystem
Sara June avatar
cn flag
Can you please share details about that
dz flag
It is in the first link I sent. You have to use the `TSEnvironment` object in PS during a running TS. That will allow you to interface directly into MDT from PS and manipulate execution, e.g. set a TS variable.
Sara June avatar
cn flag
I tried running a powershell script by keeping that in Deployment share\scripts folder and accessing that here but it is not executed. I just tested adding a firewall exception only for RDP but not working. Even I kept that as Operating System install, the "Configure1" in the above screen
dz flag
I don't understand what your issue is by the above text. Do you need help executing a PS script? Are you having issues accessing the `TSEnvironment` object? If you are having script execution issues, please open a new question.
Sara June avatar
cn flag
The options you provided may be working with sccm but they are not available with MDT. You can try in demo lab to confirm that
dz flag
They are available in MDT. I have done this before, see this tutorial for details: http://www.potentengineer.com/using-powershell-to-set-osd-task-sequence-variables/
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.