Jump to content


  • 0
Mike S

Configure User/Device Affinity During Image Deployment

Question

I am doing some recon on the possibility of determining user/device affinity during image deployment via a task sequence.

 

I would like to know if it is even possible to establish affinity during the imaging process? This could be automatic or manual (through the use of input field prompts during the TS). Provided this is possible, this could simplify the installation of existing applications that are already installed based on user enrollment in certain security groups. It will also eliminate the need to create additional packages and task sequences since applications do not run (at least I haven't figured out how to do this) during a task sequence.

 

We are running a single SCCM 2012 primary site with WSUS and SCOM. Nothing else is configured/needed at the moment.

 

Basically, I want to do the following:

 

  1. Start TS deployment
  2. Input/establish user affinity
  3. Finish image deployment (base image, user profile, etc.)
  4. Finished machine is added to correct user group based on affinity set in step 2 above.
  5. Required software for user group is installed.
  6. Machine deployed to user.
  7. Voila'...finshed.

It seems simple enough, but with the many "features" Microsoft has included with their products, I have my reservations.

 

I don't want to spin my wheels trying to figure this out on my own, so I thought I would ask here first to see if this is even feasible.

 

Thanks in advance,

Mike

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

I am running into a rather interesting issue. When I add a new deployment to the user collection, the process fails. Additionally, when I add a second user collection to the container, the process also fails.

 

The log looks good until the following error appears:

 

No Env variable with specified basename APPId and suffix '01' is found. No applications installed.

 

The sequence then aborts with an 80004004 code.

 

The second deployment is configured exactly like the first one (except for the application, of course).

 

Once I remove the deployment and the second user collection, the TS runs just fine. Is there a trick to allowing multiple application to be deployed to the same user collection that i am missing? The same goes for having multiple user collections in the same parent container (in this case, I am using "Applications" as the parent container).

 

Doing more research, but it can't hurt to ask a guru.

Share this post


Link to post
Share on other sites

  • 0

Since I have about 50 AD groups to configure, your script was a welcome relief. We are hoping to have a single OSD TS that will install applications based on user collections created using these AD memberships. Each user collection will have approximately 7 or 8 applications deployed to them.

 

I have got to talk my boss into sending me to a powershell class.

Share this post


Link to post
Share on other sites

  • 0

I rolled back to the working configuration I had a couple of days ago. Now, I am finding that this no longer works. I deleted everything and started over from scratch, hoping that my tinkering with things was what caused the problem. Everything is correct as far as I can tell, and the TS executes correctly up until the "Install Applications" sequence. The only error generated points towards the base variable not having the specified basename of "APPId". I double checked the script and it is there. I have not changed anything for the application.

 

I am at a loss since the log file tells me nothing other than the Env variable is wrong. What could possibly cause this irritating "feature" (I call all Microsoft problems that in an effort to ease the pain that often accompanies them)

 

 

post-6493-0-66302800-1402080328_thumb.jpg

Share this post


Link to post
Share on other sites

  • 0

The only thing I could identify is the 2 401 codes (see below). Nothing is highlighted in yellow or red other than what is shown in the previous post. The damn thing just quit working...how strange.

 

Here are the log entries for the powershell script:

 

The execution scope for running the powershell script is specified not to verify the signature of the scripts. This is unsafe and potentially risk running malicious scripts. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Sending warning status message RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Setting URL = http://xx.xxx.xx.xx, Ports = 80,443, CRL = false RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Setting Server Certificates. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Setting Authenticator. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Set authenticator in transport RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Setting Media Certificate. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Sending StatusMessage RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Setting message signatures. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Setting the authenticator. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
CLibSMSMessageWinHttpTransport::Send: URL: xx.xxx.xx.xx:80 CCM_POST /ccm_system/request RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Request was successful. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Powershell path: C:\Windows\System32\WindowsPowerShell\v1.0\ RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
ResolveSource flags: 0x00000000 RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
SMSTSPersistContent: . The content for package DOR0009C will be persisted RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
DownloadOnDemand flag is true. Attempting to download content locally for Package DOR0009C. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Locations: Multicast = 0, HTTP = 1, SMB = 0. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Package Flags: 0x01000000 RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Multicast is not enabled for the package. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Trying http://xx.xxx.xx.xx/SMS_DP_SMSPKG$/DOR0009C. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
GetDirectoryListing() entered RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Initializing HTTP transport. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Setting URL = http://xx.xxx.xx.xx/SMS_DP_SMSPKG$/DOR0009C. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Address=http://xx.xxx.xx.xx, Scheme=http, Object=/SMS_DP_SMSPKG$/DOR0009C, Port=80. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Setting Authenticator. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Set authenticator in transport RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
WinHttp credentials set RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
CLibSMSMessageWinHttpTransport::Send: URL: xx.xxx.xx.xx:80 PROPFIND /SMS_DP_SMSPKG$/DOR0009C RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
401 - Unsuccessful with anonymous access. Retrying with context credentials. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Using thread token for request RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Request was successful. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
DAV response string is:
<?xml version="1.0" encoding="utf-8" ?><D:multistatus xmlns:D="DAV:"><D:response><D:href>http://xx.xxx.xx.xx/SMS_DP_SMSPKG$/sccm?/DOR0009C/</D:href><D:propstat><D:status>HTTP/1.1 200 OK</D:status><D:prop><D:getcontenttype/><D:supportedlock/><D:getetag/><D:creationdate/><D:iscollection>1</D:iscollection><D:resourcetype><D:collection/></D:resourcetype><D:ishidden>0</D:ishidden><D:displayname>http://xx.xxx.xx.xx/SMS_DP_SMSPKG$/sccm?/DOR0009C/</D:displayname><D:getlastmodified></D:getlastmodified><D:getcontentlanguage/><D:getcontentlength>0</D:getcontentlength></D:prop></D:propstat></D:response><D:response><D:href>http://xx.xxx.xx.xx/SMS_DP_SMSPKG$/DOR0009C/sccm?/GetApplications.ps1</D:href><D:propstat><D:status>HTTP/1.1 200 OK</D:status><D:prop><D:getcontenttype/><D:lockdiscovery/><D:supportedlock/><D:getetag/><D:getcontentlanguage/><D:iscollection>0</D:iscollection><D:creationdate/><D:resourcetype/><D:ishidden>0</D:ishidden><D:displayname>http://xx.xxx.xx.xx/SMS_DP_SMSPKG$/DOR0009C/sccm?/GetApplications.ps1</D:displayname><D:getlastmodified>Fri, 06 Jun 2014 14:40:24 GMT</D:getlastmodified><D:getcontentlength>2448</D:getcontentlength></D:prop></D:propstat></D:response></D:multistatus> RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
List of files to be downloaded RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
File: http://xx.xxx.xx.xx:80/SMS_DP_SMSPKG$/DOR0009C/sccm?/GetApplications.ps1 RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
GetDirectoryListing() successfully completed RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Succeeded loading resource DLL 'C:\WINDOWS\CCM\1033\TSRES.DLL' RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
401 - Unsuccessful with anonymous access. Retrying with context credentials. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Downloading file /SMS_DP_SMSPKG$/DOR0009C/sccm?/GetApplications.ps1 range 0-2447 RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Downloaded file from http://xx.xxx.xx.xx:80/SMS_DP_SMSPKG$/DOR0009C/sccm?/GetApplications.ps1 to C:\_SMSTaskSequence\Packages\DOR0009C\GetApplications.ps1 RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
VerifyContentHash: Hash algorithm is 32780 RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Content successfully downloaded at C:\_SMSTaskSequence\Packages\DOR0009C. RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Resolved source to 'C:\_SMSTaskSequence\Packages\DOR0009C' RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Command line for extension .exe is "%1" %* RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Set command line: Run Powershell script RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Working dir 'C:\_SMSTaskSequence\Packages\DOR0009C' RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Executing command line: Run Powershell script RunPowerShellScript 6/6/2014 12:55:12 PM 1324 (0x052C)
Process completed with exit code 0 RunPowerShellScript 6/6/2014 12:55:19 PM 1324 (0x052C)
Command line returned 0 RunPowerShellScript 6/6/2014 12:55:19 PM 1324 (0x052C)
ReleaseSource() for C:\_SMSTaskSequence\Packages\DOR0009C. RunPowerShellScript 6/6/2014 12:55:19 PM 1324 (0x052C)
reference count 1 for the source C:\_SMSTaskSequence\Packages\DOR0009C before releasing RunPowerShellScript 6/6/2014 12:55:19 PM 1324 (0x052C)

Share this post


Link to post
Share on other sites

  • 0

I finally got it working correctly. I re-installed all of the components used and it started "working" again.

 

I am noticing that not all applications work correctly, even though they are fully functional through the Software Library. I'll have to figure that one out later.

 

Thanks again Peter.

Next time I am in Holland, I will have to buy you a drink.

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.