This project is read-only.
Creating a Set in FIM really just requires the DisplayName and Filter definition. Note the baggage inside the Filter string - this is required by FIM (you just put the XPath filter in there by itself).

Also note the use of a here-string to pretty up the script.

###
### Create the Set: 'All Craigs'
###
$setXPathFilter = @"
<Filter 
	xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance' 
	xmlns:xsd = 'http://www.w3.org/2001/XMLSchema' 
	Dialect   = 'http://schemas.microsoft.com/2006/11/XPathFilterDialect' 
	xmlns     = 'http://schemas.xmlsoap.org/ws/2004/09/enumeration'
>
	/Person[FirstName='Craig']
</Filter>
"@
New-FimImportObject -objectType 'Set' -State Create -Changes @{
	DisplayName = "All Craigs"
	Filter      = $setXPathFilter
} -ApplyNow

Last edited Aug 14, 2012 at 7:26 PM by CraigMartin, version 1

Comments

No comments yet.