Jump to content


  • 0
NaveenJoshi

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

Question

2 answers to this question

Recommended Posts

  • 0

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

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.

Guest
Answer this question...

×   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.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.