Skip to content

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

Featured Replies

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

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

image.png

step 2. Set a custom variable for that

image.png

 

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

 

image.png

 

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

 

image.png

 

here's the powershell script I used

 

IsUserinADSG.ps1

Join the conversation

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

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.