
- #Act pro v17 mail merge with outlook 2007 error 80040154 how to
- #Act pro v17 mail merge with outlook 2007 error 80040154 code
Anyway, we are going to assume that we only have one instance returned (meaning that there is only one computer object (System resource instance) in the database). As you may have noticed, this is the first time we are going to be using a commandlet in our PowerShell script.

With that done, we can use the Powershell Get-WmiObject commandlet to find the ‘Test’ computer. $directruleInstance = $directruleClass.CreateInstance()$directruleInstance.ResourceClassName = “SMS_R_System”
:max_bytes(150000):strip_icc()/enteraddress-5c9425c746e0fb0001ac13a4.jpg)
$directruleClass = “root\SMS\Site_LAB:SMS_CollectionRuleDirect” We also set the ResourceClassName property to “SMS_R_System” to let ConfigMgr know that we want to find System resources. We follow the same WMI connection process using the cast and then instantiate SMS_CollectionRuleDirect. Now that we have a new collection linked to the ‘Collections’ root node, we ought to put something in there, so let’s create a direct membership rule for a computer called ‘Test’. $subcollInstance.subCollectionID = $collection.CollectionID Since this is assigned by the provider based on existing collection IDs, we much reference it using the new collection’s object’s CollectionID property and store the new instance of SMS_CollectToSubCollect, as such: We now need to link our relationship class’s subCollectionID property to our new collection’s ID. $subcollInstance.parentCollectionID = “COLLROOT” Again, this could be any existing collection ID. So we set our relationship class (SMS_CollectToSubCollect) parentCollectionID property to COLLROOT.

$subcollInstance = $subcollClass.CreateInstance() $subcollClass = “root\SMS\Site_LAB:SMS_CollectToSubCollect” In our case, we are using COLLROOT for simplicities sake. This can be any existing collection’s ID or the special ID of COLLROOT to appear under the ‘Collections’ node. The SMS_CollectToSubCollect class is required to tie our new collection to an existing collection so that is actually shows up in the console. We now follow the same instantiation process used above to create an instance of SMS_CollectToSubCollect class. To properly handle the Path property we need to cast the type of object returned using. From there, we store our instance of the SMS_Collection class, and use the returned object to tell us the path of the new instance. You may want to set additional properties for this collection. With that done, we can populate all settings required for our collection.

$collInstance = $collClass.CreateInstance() $collClass = “root\SMS\Site_LAB:SMS_Collection” The first thing we need to do, is instantiate an instance of the SMS_Collection class. This makes things easier to maps back to C#/VBScript samples in the SDK. NET System.Management classes directly to give us direct access to WMI.
#Act pro v17 mail merge with outlook 2007 error 80040154 code
The sample is designed to work locally on the site server with a site code of LAB, but establishing a connection to a remote provider should not prove too difficult. I’ve written up the following sample to walk you through the process of converting the ‘How to Create a Static Collection’ sample in the SDK from C# or VBscript to Powershell. This post will walk you through the ConfigMgr SDK sample in VBScript and show a corresponding sample in Powershell.
#Act pro v17 mail merge with outlook 2007 error 80040154 how to
This is primarily due to the lack of samples explaining how to access the ConfigMgr WMI Provider on a Site Server. Powershell has been around for a while, though for most ConfigMgr people it remains a dark area. This is my first blog post so I thought I would make it something vaguely interesting (to certain people).
