none
Install Group in Task Sequence with variable based on the name of computer RRS feed

  • Question

  • Hello

    Sorry for my English. I'm French.

    I need in my Task Sequence, install applications of a group only if Computer Name begins with by UNISC.... (UNISCP-0000, UNISCA-2000), ...

    If the computer name begins with UNICH no install the group.

    I have try with task Sequence Variable condition :

    Variable %OSDComputerName%

    Condition equals

    Value UNISC*

    But do not work.

    Can you help me please ?

    Thank you in advance for your help.

    Saturday, June 13, 2015 9:52 AM

Answers

  • Easiest solution to my knowledge is to work with WMI query:

    select * from win32_computersystem where name like "UNISC%"

    This can be used as a condition on steps that either set a task sequence variable for your "Install group" or individual applications.

    Cheers! Rens


    If this post is helpful please click "Mark for answer", thanks! Kind regards

    • Marked as answer by Steve Fe Monday, June 22, 2015 12:25 PM
    Monday, June 22, 2015 7:58 AM

All replies

  • You could send try a SQL stored procedure http://msitpros.com/?p=1442

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Saturday, June 13, 2015 4:08 PM
    Moderator
  • Your English is quite good, no need to apologize :)

    How do you name your computer, do the computer get their names dynamically as well or you name them manually during the deployment wizard- I am asking this as it will help me a lot to figure out how to get them installed. 

    thank you. 


    Mayank Sharma Support Engineer at Microsoft working in Enterprise Platform Support.

    Sunday, June 14, 2015 7:56 PM
  • Hello 

    This name of my computer is defined in the Rules, example :

    [B8:CA:3A:7D:BD:0C]
    ComputerName=UNICH-2720
    SkipComputerName=YES.

    If the address mac is not filled, MDT request the computer name.

    Thank you in advance.

    • Edited by Steve Fe Monday, June 22, 2015 6:38 AM space
    Monday, June 22, 2015 6:37 AM
  • Easiest solution to my knowledge is to work with WMI query:

    select * from win32_computersystem where name like "UNISC%"

    This can be used as a condition on steps that either set a task sequence variable for your "Install group" or individual applications.

    Cheers! Rens


    If this post is helpful please click "Mark for answer", thanks! Kind regards

    • Marked as answer by Steve Fe Monday, June 22, 2015 12:25 PM
    Monday, June 22, 2015 7:58 AM
  • Thank you verry much ! The solution works ! Great !

    And if i will computer with name UNSC% and UNITT% too install this application, i add a condition ?


    Thank you.

    Monday, June 22, 2015 11:50 AM
  • Indeed, you can add a condition for each computername that you have. The % symbol represents a wilcard. So everything after UNSC is considered irrelevant. The query now only looks for computernames that match UNSC.

    So you can have a install group for each of those computers.

    Please don't forget to mark as answer! :)

    Cheers! Rens


    If this post is helpful please click "Mark for answer", thanks! Kind regards

    Monday, June 22, 2015 11:54 AM
  • Sorry for not replying earlier. you can also do it by eiting customsettings.ini file and using subsections. I tested it in my lab and it works just fine. i specified the name DADADA as an OSDcomputername and then created a subsection where if the first two letters matches the 'DA' it will mark an application as mandatory. 

    below is my cs.ini file:

    [Settings]
    Priority=Default, bycomputername
    Properties=MyCustomProperty

    [Default]
    _SMSTSOrgName= Mayank MDT Deployment
    OSInstall=Y
    SkipCapture=YES
    SkipAdminPassword=YES
    SkipProductKey=YES
    OSDComputerName=DADADA
    JoinWorkgroup=WG
    SkipApplications=NO
    SkipUserData=YES
    ;SkipBitLocker=NO
    ;TaskSequenceID=DISKPAER1
    ;SkipTaskSequence=YES


    [bycomputername]
    subsection=OSD-#Left("%OSDCOMPUTERNAME%",2)#

    [OSD-DA]
    MandatoryApplications001={a37bf88b-c5d2-4cb0-8857-9099a2a536f0}


    Mayank Sharma Support Engineer at Microsoft working in Enterprise Platform Support.

    Sunday, June 28, 2015 7:53 AM