SCCM 2012 R2 SP1 and User Device Affinity

I’m using the Boot Image to set User Device Affinity (UDA) to devices managed by SCCM 2012 R2 SP1.

First, here’s how we script looks to:

Dim userDA, smsUserMode
Set env = CreateObject("Microsoft.SMS.TSEnvironment")

' We enable UDA variable here - before assigning user
smsUserMode = "Auto"
env("SMSTSAssignUsersMode") = smsUserMode

userDA = Inputbox("Type a valid Active Directory user account." & vbCrLf & vbCrLf & _
"Format: DOMAIN\Username", "Name of primary user for device...")
env("SMSTSUdaUsers") = userDA

' writing to log
wscript.echo "User device affinity set to " & env("SMSTSUdaUsers")
wscript.echo "We're going to set UDA by setting SMSTSAssignUsersMode variable to: " & env("SMSTSAssignUsersMode")

I’m going to save this script on a shared network location. This code is widely used by many people, and I’m not the creator of it; I’ve just slightly modified it.

Next, I’m going to customize the Boot Image file in SCCM, see screenshot.

Boot Image UDA

That’s it!

, , , , , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: