Skip to content

Automatically join a collection after ts

Featured Replies

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.

  • Author

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 by anyweb
removed profanity. keep on topic thanks

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 ?

  • Author

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?

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.

  • Author

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

  • Author

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?

  • Author

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?

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.