Blogroll

Friday, January 9, 2015

NoILMUsed UserProfileApplication class property should not use: SharePoint 2013

While reading some articles on internet, I bumped in very interesting article shared by MS back in 2013.

A property name NoIMLUsed was elaborated an MS suggest this property should not be altered else can damage you are working User Profile service.

They have given a PowerShell Snippet below to be used to correct this.

$upa = Get-SPServiceApplication | ? {$_.typename -like 'User Profile *'}
if ($upa -eq $null)
{
    Write-Host "No User Profile service application is found."
    Return
}

if ($upa.noILMUsed -eq $true)
{
    Write-Host "Reverting back the NoILMUsed flag to false..."
    $upa.noILMUsed = $false    
    try
    {
        $upa.Update()
    }
    catch
    {
        Write-Host "Failed updating UPA once. Try it again..."
        $upa = Get-SPServiceApplication | ? {$_.typename -like 'User Profile *'}
        $upa.noILMUsed = $false 
        $upa.Update()
    }

    # check the flag after update
    $upa = Get-SPServiceApplication | ? {$_.typename -like 'User Profile *'}
    if ($upa.noILMUsed -eq $false)
    {
        Write-Host "Successfully reverted back the NoILMUsed flag to false."
    }
    else
    {
        Write-Host "Failed to revert back the flag. Please try running the script again."
        Return;
    }
}
else
{
    Write-Host "The NOILMUsed flag is already set to false. "
}

# check sync service status
$syncServices = @(Get-SPServiceinstance | ? {$_.typename -like 'User Profile Synchronization *'})
$flag = $false
foreach ($service in $syncServices)
{
    if ($service.status -eq 'Online')
    {
        $flag = $true
        break
    }
}

if ($flag -eq $false)
{
    Write-Host "The User Profile Synchronization service is not started in this farm. Please proceed with restarting the profile sync service when in need." 
}
else
{
    Write-Host "All appears to be good."
}

Reference KB can be found here: https://support.microsoft.com/kb/2624198

I hope this information is useful for you.


Applies to: SharePoint Server 2013.
Post a Comment

ShareThis

snow flakes

blogger widgets Blogspot Tutorial

LinkWithin

Related Posts Plugin for WordPress, Blogger...