Stopped-extension-dll-exceptions in User Profile Sync

Symptons: You get stopped-extension-dll-exceptions in MIIS client while running full or incremental user profile sync.

Fix: This problem arises from user profiles that have URL in PictureURL field, but the picture is not accessible. You can fix this issue by running the following PS script. The script loops through every user profile and makes a HTTP request to the picture URL. If the URL cannot be accessed the script clears PictureURL field.

# Get user profile service
$UserProfileService = @(Get-SPServiceApplication | ? { $_.TypeName -eq "User Profile Service Application" })[0]

    $serviceContext = [Microsoft.SharePoint.SPServiceContext]::GetContext($UserProfileService.ServiceApplicationProxyGroup, [Microsoft.SharePoint.SPSiteSubscriptionIdentifier]::Default);
    $profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext)

    # Get all profiles
    $allProfiles = $profileManager.GetEnumerator();

    $counter = 0;
    $decCounter = 0;

    # Loop through every profile
    foreach($profile in $allProfiles)

        $url = $Profile['PictureURL'] -as [string];

            # Create HTTP Request
            $req = [system.Net.WebRequest]::Create($url)
            $req.UseDefaultCredentials = $true
            try {
                $res = $req.GetResponse()
            catch [System.Net.WebException] {
                $res = $_.Exception.Response

            $int = [int]$res.StatusCode
            $status = $res.StatusCode

            # If the image cannot be accessed clear the field
            if($int -gt 400)
                Write-Host -NoNewLine $Profile['PreferredName'] "profile picture broken "
                $Profile['PictureURL'].Value = $null;
                Write-Host -ForegroundColor Green "[FIXED]";

        if($deccounter -eq 10)
            Write-Host $counter" user profile checked";

After running this script the User Profile Sync started to work immediately.


Leave a Reply

Your email address will not be published. Required fields are marked *