Jump to content

Sign in to follow this  

How can I Deploy Applications based on AD security group membership for Users using a Task Sequence during OSD ?

Recommended Posts

here's one way of doing it for users, you could easily modify the PowerShell script to take the two parameters so it's a one step process instead of 3, i just haven't had time yet to modify it.

Note: You will need to define the TargetUser in the task sequence using whatever method you want as the script checks for that in the following line:

$strName = $tsenv.Value("targetuser")

Step 1. Set TargetADSG

set the target Active Directory Security Group you want to test if the user is present in


step 2. Set a custom variable for that



Step 3. call the powershell script

(uses ServiceUI.exe from the MDT Toolkit, use the correct architecture for the version of Windows you are deploying)

ServiceUI.exe -process:TSProgressUI.exe %SYSTEMROOT%\Sysnative\WindowsPowerShell\v1.0\powershell.exe -windowstyle hidden -NoProfile -ExecutionPolicy bypass -File IsUserinADSG.ps1




Step 4, Run the Group to install software if the CustomVar set earlier is true




here's the powershell script I used



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...