Skip to content

Instantly share code, notes, and snippets.

@KentNordstrom
Created May 3, 2018 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save KentNordstrom/5e9a6ee3869d5457b5da2cd74770832e to your computer and use it in GitHub Desktop.
Save KentNordstrom/5e9a6ee3869d5457b5da2cd74770832e to your computer and use it in GitHub Desktop.
Enable Hybrid Reporting in MIM 2016 without installing the MIMReportingAgent
<#
.SYNOPSIS
Script to manually configure MIM 2016 Hybrid Reporting without installing the Agent as described in
https://docs.microsoft.com/en-us/microsoft-identity-manager/working-with-identity-manager-hybrid-reporting
#>
# Step 1. Create the EventLog to store the MIM Request Events in.
New-EventLog -LogName "Identity Manager Request Log" -Source "Microsoft.IdentityManagement.Service"
# Step 2. Add hybrid reporting setting in FIMService config file. Setting hybridReportingRequestLoggingEnabled="true"
$Config = [xml] (Get-Content 'C:\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.ResourceManagement.Service.exe.config')
$hybridReportingRequestLoggingEnabled = $Config.configuration.resourceManagementService.OwnerDocument.CreateAttribute("hybridReportingRequestLoggingEnabled")
$hybridReportingRequestLoggingEnabled.Value = "true"
$void = $Config.configuration.resourceManagementService.Attributes.Append($hybridReportingRequestLoggingEnabled)
$Config.Save('C:\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.ResourceManagement.Service.exe.config')
# Step 3. Restart FIMService service
Restart-Service FIMService
@bpalfaro
Copy link

bpalfaro commented Jan 3, 2019

After running this script, we needed to perform a restart of the MIM Service server. Our scenario required the deletion of an application log called Identity Management Team because the LogName in the gist caused a collision. Also, we ran this script as the MIM Service service account in our final state that triggered event log entries.

@bpalfaro
Copy link

Hey Kent,

Check my fork for a dynamic build of the .config file based on the FIMService regkeys.

Thanks,
Bryan

@KentNordstrom
Copy link
Author

@bpalfaro Showed one way to get a dynamic path. Another option is something like this on line 11...
$Config = [xml] Get-Content ((Get-Process -Name Microsoft.ResourceManagment.Service).Path).config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment