xdemafried Posted April 12, 2012 Report post Posted April 12, 2012 Hi everybody, I need some script or something to do an automatically join to a collection after a task sequence installation is finished. Ok I already got such a script (See attachment Join-to-collection_....) This script runs as the last step of my task sequence. Quote Share this post Link to post Share on other sites More sharing options...
xdemafried Posted April 12, 2012 Report post Posted April 12, 2012 (edited) Well ****. Ok do not press Tab for text formats :/ Okay here we go again We do an image installation with the ts and advertised standard programs to another collection in which the machines should automatically join after the ts installation. I have a script which runs as the last step of my task sequence. The script should do the join to the collection with the standard applications. I tested the script manually and it worked. But I dont know if it worked in the ts, because I dont see the clients in the collection with the application advertised. The problem is, we are running a direct rule to remove the machines from the installation collection and join them to all systems. Here is the problem. I think the script would work, but the machine will be removed from the direct rule which should do the new join to the all systems collection. The direct rule is a vbs script, too. Is there a SCCM internal way to do a automatically join to a collection when the machine is installed from one collection. Or is somebody good in scripting and could build me one big script which I could set as direct rule. Which would remove the machine from the install collection and add them to the all system and standard applications collection. Another problem is, we are having more than one install collection, and the direct rule is working for all of this collections. I hope I could explain my problem in a way you will understand it o.O Sorry had problems uploading the files. The file Join-to-Collection..... is the script which should do the automatically join to the standard application collection The file RemoveDirectRule is the script which removes the machine from the install collection Join-to-Collection_1_All_All_En_P01.txt RemoveDirectRule.txt Edited April 12, 2012 by anyweb removed profanity. keep on topic thanks Quote Share this post Link to post Share on other sites More sharing options...
anyweb Posted April 12, 2012 Report post Posted April 12, 2012 when you run the script in the task sequence it's running under the local system account which probably is your problem, have you tried specifying a service account with permissions to do this in the step instead ? Quote Share this post Link to post Share on other sites More sharing options...
xdemafried Posted April 13, 2012 Report post Posted April 13, 2012 Ahhh okay. I thought it would run with the SCCM account, who is doing the software installation. I checked this account. Can I specify an account in the ts or must the account be set in the script? Quote Share this post Link to post Share on other sites More sharing options...
Peter van der Woude Posted April 13, 2012 Report post Posted April 13, 2012 You can specify an account when you use a Run Commandline -step (and have R2 or R3 installed). Quote Share this post Link to post Share on other sites More sharing options...
ferryx Posted April 16, 2012 Report post Posted April 16, 2012 It is easy with an Auto Collection Rule. You make an rule on an collection that is reffered to the OSD Collection. Then you need to add some critteria "systemressource.client = 1" Thats all. Quote Share this post Link to post Share on other sites More sharing options...
xdemafried Posted April 16, 2012 Report post Posted April 16, 2012 Ah great thx. Seems its working but now the obsolete machine is joined :-/ I think I need to prepare my direct rule script..... Thanks for your help Quote Share this post Link to post Share on other sites More sharing options...
xdemafried Posted April 16, 2012 Report post Posted April 16, 2012 It is easy with an Auto Collection Rule. You make an rule on an collection that is reffered to the OSD Collection. Then you need to add some critteria "systemressource.client = 1" Thats all. Sorry I dont get it...I create a membership rule and limite it to the OSD collection.Than I create criteria. Resource class -> System ResourceWhich Criterion Type should I choose? List of values?ThanAttribute class -> System Resource Alias as -> no alias????Attribute -> ClientOperator -> is inValue 1Is this right? Quote Share this post Link to post Share on other sites More sharing options...
xdemafried Posted April 18, 2012 Report post Posted April 18, 2012 I am stuck in creating a script which would work as the direct rule and deletes the machine from the install collection and join it to all systems. And from one install collection it should do a second join to a collection with my standard applications. Is anybody good in vbs scripting and able to help me? Quote Share this post Link to post Share on other sites More sharing options...