none
Lync provision using the Granfeldt PowerShell MA RRS feed

  • Question

  • Hello!

    I'm trying to enable Lync services for my users using this guide:

    https://blog.kloud.com.au/2016/01/28/provisioning-users-for-lync-skype-for-business-with-fim-mim-using-the-granfeldt-powershell-management-agent/

    As I understand enablement of Lync services is processed when we are run "Export" for PS MA.

    But when I start export - nothing happens.

    Can anybody say where can be a problem?

    Thanks!


    1

    Monday, October 24, 2016 1:56 PM

Answers

  • Problem resolved by using this script:

    https://github.com/Microsoft/MIMPowerShellConnectors/wiki/Lync-Connector

    Everything is working and configuration is more simple.

    Thanks!


    1

    • Marked as answer by alexiszp Friday, November 18, 2016 9:58 AM
    Friday, November 18, 2016 9:58 AM

All replies

  • Can you clarify nothing happens ? I would add a write event in your script to see if it called or look at the application or sync logs to see if any exceptions shed some lite
    Tuesday, October 25, 2016 11:48 AM
    Moderator
  • That's strange, but:

    1. When I running "Export" for PowerShell MA I don't get nothing in log file, like it's a permission issue to folder or file. After that I add access rights "Full Control" to account for running PowerShell MA for LOG folder.
    But nothing changed.

    2. When I'm trying to run Export script manually I need to enter my PowerShell MA credentials and get this errors:

    PS C:\Install\PSMA\Lync> .\export.ps1
    You cannot call a method on a null-valued expression.
    At C:\Install\PSMA\Lync\export.ps1:30 char:5
    +     $password.ToCharArray() | ForEach-Object {$securestring.AppendChar($_)}
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull

    New-Object : Exception calling ".ctor" with "2" argument(s): "Cannot process argument because the value of argument "us
    erName" is not valid. Change the value of the "userName" argument and run the operation again."
    At C:\Install\PSMA\Lync\export.ps1:31 char:19
    +     $credential = New-Object -TypeName System.Management.Automation.PSCredential ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
        + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand


    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Script     1.0        tmp_bx2womhw.whr                    {Enable-CsUser, Get-CsAdUser, Get-CsUser, Set-CsUser}

    Key   : [Identifier]
    Value :
    Name  : [Identifier]


    Key   : [ErrorName]
    Value : success
    Name  : [ErrorName]



    And I get a record in LOG file (after manual start):
    Starting Export : 10/25/2016 15:36:30

    Strings with errors from PowerShell code:
    (30) $password.ToCharArray() | ForEach-Object {$securestring.AppendChar($_)}
    (31) $credential = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $username, $securestring

    Ideas?

    Thanks!

    • Edited by alexiszp Tuesday, October 25, 2016 1:26 PM
    Tuesday, October 25, 2016 12:52 PM
  • After some troubleshooting situation is like this:

    1. I'm running "Export" and getting error in PowerShell MA:

    ma-extension-error

    Connected data source error code 0x80230703

    unexpected-error

    2. Log file contains:

    Starting Export : 10/25/2016 17:39:58


    [Identifier]               : da0a4de1-ac9a-e611-80ce-.......
    [Anchor]                   : f5b8f25d-0555-44b0-a4bc-.......
    [IdentifierAsGuid]         : 
    [ObjectModificationType]   : Replace
    [ObjectType]               : user
    [AttributeNames]           : {RegistrarPool, employeeID, sipAddress, upn...}
    [ChangedAttributeNames]    : {msExch........}
    [DN]                       : f5b8f25d-0555-44b0-a4bc-......
    [RDN]                      : f5b8f25d-0555-44b0-a4bc-.....
    accountName                : testuser
    lyncEnabled                : False
    msExch..... : f5b8f25d-0555-44b0-a4bc-......
    upn                        : testuser@lab.local

    3. MS error log:

     

    6801:

    The extensible extension returned an unsupported error.
     The stack trace is:

     "System.NullReferenceException: Object reference not set to an instance of an object.
       at Granfeldt.PowerShellManagementAgent.Microsoft.MetadirectoryServices.IMAExtensible2CallExport.PutExportEntries(IList`1 csentries)
    Forefront Identity Manager 4.3.2266.0"

    6401:

     

    The management agent controller encountered an unexpected error.

     "BAIL: MMS(6504): extensionmanager.cpp(620): 0x80230703 (The extension threw an exception.)
    BAIL: MMS(6504): extensionmanager.cpp(2648): 0x80230703 (The extension threw an exception.)
    BAIL: MMS(6504): export.cpp(2150): 0x80230703 (The extension threw an exception.)
    BAIL: MMS(6504): export.cpp(521): 0x80230703 (The extension threw an exception.)
    BAIL: MMS(6504): ..\cntrler.cpp(9848): 0x80230703 (The extension threw an exception.)
    BAIL: MMS(6504): ..\cntrler.cpp(8569): 0x80230703 (The extension threw an exception.)
    Forefront Identity Manager 4.3.2266.0"

    Thanks for help!


    1



    • Edited by alexiszp Tuesday, October 25, 2016 2:57 PM
    Tuesday, October 25, 2016 2:50 PM
  • Added:

    DebugView PSMA Error: -2147467261: putexportentries, Object reference not set to an instance of an object


    1

    Wednesday, October 26, 2016 3:07 PM
  • Added:

    

    As you can see there is no match (for one user) for Identifier/Anchor attributes. That's strange.

    Anybody?

    Thanks!


    1

    Thursday, October 27, 2016 2:43 PM
  • Problem resolved by using this script:

    https://github.com/Microsoft/MIMPowerShellConnectors/wiki/Lync-Connector

    Everything is working and configuration is more simple.

    Thanks!


    1

    • Marked as answer by alexiszp Friday, November 18, 2016 9:58 AM
    Friday, November 18, 2016 9:58 AM