Script, that populates base variable with packages and programs based on Computer’s AD group membership.


 

Here is the script, that will find all groups computer belongs to and if they start with some special prefix (defined in the code as AD_GROUP_PREFIX constant), it will take a description, that’s using the same format as a base variable for Install Software step (PackageID:Program Name) and will add it to the variable defined in BASE_VARIABLE constant. Run it before Install Software step, and by just adding computers to AD groups you will get the software installed. Put this script under “Scripts\Custom” folder on your MDT Package.

 

 

InstallSoftwareBasedOnGroupMembership.txt


Comments (2)

  1. Troy says:

    Hey Alex!!

    Because this requires domain membership, I'm assuming this will only work under a REFRESH scenario…correct?

  2. alex_semi says:

    True, but you can pre-create computer account in AD for your new computer in replace / bare metal scenario and add it to AD group.

    But, I'd recommend UDI app discovery for that, this is more for ZTI refresh or ZTI bare metal, you're right.

    Thank you.