Skip to content

How can I Deploy Applications based on AD security group membership for Computers using a Task Sequence

Featured Replies

I can confirm it works in 2012. I did use MDT 2012 files in Config manager 2012.

 

I didn't need to install MDT 2012 just use the relevant files.

 

thanks for all your help

  • 2 months later...
  • Replies 31
  • Views 128.6k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • you don't need a MDT task sequence but you do need those scripts yes, I havnt tested it in Configuration Manager 2012 yet but I think it'll work

  • I can confirm it works in 2012. I did use MDT 2012 files in Config manager 2012.   I didn't need to install MDT 2012 just use the relevant files.   thanks for all your help

Posted Images

Hi,

 

Just thought I'd drop it in here. Another option might be to create a Collection that contains the specified AD group as member (or a query that gathers the members of the AD group) and set a collection variable. Because the Computer is member of the specified collection through it's AD group membership, it gets the specific variable available in the task sequence.

 

This way you can accomplish the same without having to do any custom scripting.

 

Just my 2 cents :)

  • 1 month later...

Hi,

 

Just thought I'd drop it in here. Another option might be to create a Collection that contains the specified AD group as member (or a query that gathers the members of the AD group) and set a collection variable. Because the Computer is member of the specified collection through it's AD group membership, it gets the specific variable available in the task sequence.

 

This way you can accomplish the same without having to do any custom scripting.

 

Just my 2 cents :)

Hi, Can you please explain it in more detail? I have a requirement to install applications during OSD task sequence based upon membership of users into AD groups. We have the user to computer UDA preconfigured. We also have ConfigMgr user collections querying AD groups. But the challenge is to install application based upon user membership of a AD group. Can this be done without scripting?

Hi, thanks for great article. In your task sequence all the applications have to be pre-created as tasks and then you check whether to install or not install a particular application upon membership of the computer in AD group which is associated with application.

 

I have a requirement to install applications during OSD task sequence based upon membership of users into AD groups. We have the user to computer UDA preconfigured. We also have ConfigMgr user collections querying AD groups. But the challenge is to install application based upon user membership of a AD group. What do you suggest as best way of handling it?

 

Many thanks!

you could prompt for the Username via a HTA frontend and use that username instead of computername to do the checking against.

Sorry, I wasn't clear enough. I can for sure get the username before the deployment starts and also scan for user's membership of AD groups but how do we pass this information to make task sequence install the applications needed. We have 1000+ applications and same number of AD groups. I think we cannnot manually create all the application install steps in the task sequence. So, I wanted to know what are your thoughts on acheiveing this? I can create a script to query AD groups and pass on the list of group of which the user is member but have no idea how would I use that list. May be set Coalesceapp? Not sure how to do it though.

  • Author

We have 1000+ applications and same number of AD groups. I think we cannnot manually create all the application install steps in the task sequence. So, I wanted to know what are your thoughts on acheiveing this?

 

simple, reduce the number, create a top 50 list of apps that you will install dynamically for users during the task sequence, everything else gets installed using normal Configuration manager jobs, that's how we do it where I work (global company,26000 clients)

simple, reduce the number, create a top 50 list of apps that you will install dynamically for users during the task sequence, everything else gets installed using normal Configuration manager jobs, that's how we do it where I work (global company,26000 clients)

Thanks for the suggestion, not sure I can reduce the list to 50. I will post some updates in coming days if I succeed.

  • 1 month later...

Why over complicate this so much?

 

Daniel Oxley's original post had 4 actions per application to install. Niall's still has 3 actions per application to install. Multiply that by a mere 10 applications and you've got 30 actions (+ a group per set of 3 actions making it a total of 40 steps in TS).

 

I just do the following instead: created a 30 line script which gets the list of groups a computer is a member of. For each group the computer is a member of, it creates a TS variable where the name of the variable is the CN of the group and the value is set to True.

 

That way, you call the script to load the groups once and then on your conditions instead of using INSTALLAPP = True you use Firefox Users = True

 

This example works only on direct membership groups, but it can be easily modified to accommodate nested grouping by using the example here from Richard Mueller: http://www.rlmueller.net/Programs/IsMember8.txt. Should also be noted that the solution presented by both Daniel and Niall also only work in direct group membership.

 

On top of that, the solution from Daniel works out whether a computer is a member of the group by cycling through every single member until it either finds the computer or runs out of members to check against, when there's already a IsMember() method that returns True or False and can be called as:

 

Set objGroup = GetObject("LDAP://" & strGroupDN)

If objGroup.IsMember(strComputer) Then ...

 

 

 

Anyway, here's my alternative:

<job id="ZTIBde"> 
	<script language="VBScript" src="ZTIUtility.vbs"/> 
	<script language="VBScript">
	
iRetVal = ZTIProcess
ProcessResults iRetVal

Function ZTIProcess()
	ZTIProcess = Success
	
	On Error Resume Next
	
	oLogging.CreateEntry "Retrieving direct groups membership.", LogTypeInfo
	
	Set objSysInfo = CreateObject("ADSystemInfo")
	Set objComputer = GetObject("LDAP://" & objSysInfo.ComputerName)
	
	If IsArray(objComputer.MemberOf) Then
		For Each strGroup In objComputer.MemberOf
			oEnvironment.Item(GetObject("LDAP://" & strGroup).CN) = True
		Next
	Else
		If Len(objComputer.MemberOf) > 0 Then
			oEnvironment.Item(GetObject("LDAP://" & objComputer.MemberOf).CN) = True
		End If
	End If
	
	ZTIProcess = err.Number
End Function

	</script>
</job>

It doesn't work in WinPE as is, but why would you want it to anyway? You can't install applications whilst in WinPE (though this can be easily modified to work in WinPE too for the skeptic ones).

Should also be noted that the solution presented by both Daniel and Niall also only work in direct group membership.

 

Not true... This solution of Niall directly queries the Active Directory group via LDAP, so it does nothing with (direct) collection membership. Also it should be noted that Niall is giving a lot of examples and ideas of how things COULD be done.

 

While we're spamming ideas now anyway, in case someone wants to do this with Orchestrator and users, then have a look here: http://www.petervanderwoude.nl/post/new-and-improved-pre-provision-user-applications-during-os-deployment-via-orchestrator-and-configmgr-2012/

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.