This article is extremely useful when trying to get the EnumerateResourcesActivity to work in the FIM workflows: http://c–shark.blogspot.com/2009/04/how-to-use-enumerateresourcesactivity.html
I don’t use the activity too often and forget that the designer code behind needs to be modified to add a code activity (which isn’t add via the UI) to the EnumerateResourcesActivity.
Just a sample script. I forgot that the message body needed to be converted to a string format and, as this script was being called by a back end process, it took me a while to figure out what the error was.
Add-Type -Path ‘F:\Program Files\Microsoft\Exchange\Web Services\2.0\Microsoft.Exchange.WebServices.dll’
#Create the EWS service object
$service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService -ArgumentList Exchange2010_SP1
#Set the credentials for Exchange Online
#$service.Credentials = New-Object Microsoft.Exchange.WebServices.Data.WebCredentials -ArgumentList `
$service.UseDefaultCredentials = $true
#Determine the EWS endpoint using autodiscover
#Get the email body
$body = Get-Content “C:\Files\EmailTemplate.htm”
$body = $body -replace “Placeholder”, $Placeholder
#Have to convert the object to a string to use in the mail body.
[string]$msgBody = $body
#Create the email message and set the Subject and Body
$message = New-Object Microsoft.Exchange.WebServices.Data.EmailMessage -ArgumentList $service
$message.Body.BodyType = ‘HTML’
$message.From = “firstname.lastname@example.org”
$message.Subject = “A message for you”
$message.Body = $msgBody
#Send the message and save a copy in the users Sent Items folder (Alt is message.Send which will not save a copy.)
Had to futz around with this for a little while to get a line break in the Telephone Info field in Active Directory. Environment.NewLine wasn’t working for me. Using “/r/n” did the trick though.
I needed a query to figure out which users in the metaverse were not connected to AD. With help from Carol Wapshere’s post on querying the metaverse (http://www.wapshere.com/missmiis/sql-query-find-metaverse-objects-with-n-connectors), I came up with this:
select EmployeeID from mms_metaverse where object_type =‘person’ and object_id not in
(select mv_object_id from dbo.mms_connectorspace cs
join dbo.mms_management_agent ma on
cs.ma_id = ma.ma_id
join dbo.mms_csmv_link mv on
mv.cs_object_id = cs.object_id
where ma.ma_name =‘ADMA’and object_type =‘user’)
I recently added a new attribute and binding in the FIM portal. After refreshing the FIM MA schema I added an attribute flow to this new attribute and received AttributeNameViolatesSchema InvalidRepresentationException exceptions.
Not sure why, but restarting the FIM Service, FIM Sync Service and doing an iisreset fixed the problem. Perhaps the FIM Sync Service restart wasn’t necessary… But I’m not sure at this point.
Had a weird situation for a few days where all update or delete requests to the FIM portal were timing out–but retrieving data worked just fine.
Running this command against the FIMService DB seems to have helped:
exec sp_updatestats ‘resample’
Several sites led me to the solution here: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f0692fe1-f2e1-4cb9-9fdb-0cf27077bc39/update-stats-with-full-scan-on-database
I was working in a dev environment and noticed that the “All Users” search scope was no longer appearing in the drop down list.
This perplexed me because I had not changed any search scopes or permissions in a long time. All I had been doing was merrily cleaning up some attributes the schema no longer needed.
Turns out one of the attributes I deleted was referenced in the search scope in the list of attributes to search and the results to display. Removing the now no longer existent attribute allowed the search scope to be displayed again after a service restart.