Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bpalfaro/998b0866527b064b783603f21683d5ba to your computer and use it in GitHub Desktop.
Save bpalfaro/998b0866527b064b783603f21683d5ba 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"
Set-Variable -name REGKEY -value "HKLM:\SYSTEM\CurrentControlSet\Services\FIMService"
$configfile = ((get-itemproperty -name ImagePath -path $REGKEY).IMagePath -replace '"','') + ".config"
# Step 2. Add hybrid reporting setting in FIMService config file. Setting hybridReportingRequestLoggingEnabled="true"
$Config = [xml] (Get-Content $configfile)
$hybridReportingRequestLoggingEnabled = $Config.configuration.resourceManagementService.OwnerDocument.CreateAttribute("hybridReportingRequestLoggingEnabled")
$hybridReportingRequestLoggingEnabled.Value = "true"
$void = $Config.configuration.resourceManagementService.Attributes.Append($hybridReportingRequestLoggingEnabled)
$Config.Save($configfile)
# Step 3. Restart FIMService service
Restart-Service FIMService
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment