none
Using FIM Powershell Activity on Windows 2012 RRS feed

  • Question

  • Hi,

    I'm using FIM Powershell Activity (http://fimpowershellwf.codeplex.com/)

    In my powershell I need to use some module (ActiveDirectory) which appears to be on the server in version 3.0. However powershell activity seams to be executing powershell 2.0. And I'm getting follwing error while trying to load it:

    Import-Module : The 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDi
    rectory\ActiveDirectory.psd1' module cannot be imported because its manifest con
    tains one or more members that are not valid. The valid manifest members are ('M
    oduleToProcess', 'NestedModules', 'GUID', 'Author', 'CompanyName', 'Copyright',
    'ModuleVersion', 'Description', 'PowerShellVersion', 'PowerShellHostName', 'Powe
    rShellHostVersion', 'CLRVersion', 'DotNetFrameworkVersion', 'ProcessorArchitectu
    re', 'RequiredModules', 'TypesToProcess', 'FormatsToProcess', 'ScriptsToProcess'
    , 'PrivateData', 'RequiredAssemblies', 'ModuleList', 'FileList', 'FunctionsToExp
    ort', 'VariablesToExport', 'AliasesToExport', 'CmdletsToExport'). Remove the mem
    bers that are not valid ('HelpInfoUri'), then try to import the module again.

    Did anyone had same problem and have some quick workaround?


    Borys Majewski, Identity Management Solutions Architect (Blog: IDArchitect.NET)

    Thursday, February 6, 2014 10:26 AM

Answers

  • I was trying to fix the activity but for now it is not simple. Simple reason is that FIM activities are using .NET 3.5 (and as far as I know 4.0 is not supported yet). But in case you want to use PowerShell 3.0 you have to use .NET 4.0.

    Maybe you can do it with some additionall layer (invoking another thread with PS 3.0) but I prefere to have it simple.

    So for now workaround is to use just scripts which works with PS 2.0

    UPDATE

    And in case you really need some PowerShell 3.0 modules just call

    powershell -version 3.0 -command your_command_file.ps1

    from your PS activity :-)


    Borys Majewski, Identity Management Solutions Architect (Blog: IDArchitect.NET)


    Tuesday, February 11, 2014 8:49 AM

All replies

  • 1. Get a code from Codeplex, modify it and then post pull request. 

    2. Re-work your powershell script to do these operations without AD Pshell module 


    Tomek Onyszko, memberOf Predica FIM Team (http://www.predica.pl), IdAM knowledge provider @ http://blog.predica.pl

    Thursday, February 6, 2014 2:00 PM
  • Thanks Tomek,

    I know I can get code from Codeplex and change it. I was curious if anybody did such change already (I expect it maybe problem that fim uses different version of .NET then powershell 3).

    Option 2 - it can work for now but excpect that problem may come back soon with some other module so I think  it is better to solve it for real :-)


    Borys Majewski, Identity Management Solutions Architect (Blog: IDArchitect.NET)

    Thursday, February 6, 2014 2:36 PM
  • I was trying to fix the activity but for now it is not simple. Simple reason is that FIM activities are using .NET 3.5 (and as far as I know 4.0 is not supported yet). But in case you want to use PowerShell 3.0 you have to use .NET 4.0.

    Maybe you can do it with some additionall layer (invoking another thread with PS 3.0) but I prefere to have it simple.

    So for now workaround is to use just scripts which works with PS 2.0

    UPDATE

    And in case you really need some PowerShell 3.0 modules just call

    powershell -version 3.0 -command your_command_file.ps1

    from your PS activity :-)


    Borys Majewski, Identity Management Solutions Architect (Blog: IDArchitect.NET)


    Tuesday, February 11, 2014 8:49 AM