Home Powershell

Cannot Load MicrosoftTeams Powershell module in Powershell activity

Harold_HarrisHarold_Harris Customer IT Monkey ✭

If I do not import the module and try to run a microsoftteams command I get the error that it is not a recognized cmdlet. Which usually means you need to import the module.

When I try to import the module as part of the script I get the error message "Could not load file or assembly 'System.ValueTuple, Version=, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified."

I have tried the Run In a Separate Process setting for the script. With that set I get the error in the PSLog "Input string was not in a correct format." and the activity just stays in process forever.

I tried Run As Account User with an account that is local admin and I get the same message.

This only happens when running the script as a PowerShell Activity inside of SCSM. I cannot recreate the error outside of that.

It did work without importing the module. I have not been able to trace down when it stopped working.

Any suggestions would be appreciated. Thank!


  • Options
    Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭

    Is the module installed on your scsm workflow server?

    We also use smlets,import-excel and some other modules, without the need of importing them in the script. Preecondidtion is, that the module is installed on the workflow server with the following command (You have to start a powershell with admin rights to do so):

    $moduleName = #your module name#
    Install-module $moduleName -scope AllUsers
  • Options
    Harold_HarrisHarold_Harris Customer IT Monkey ✭

    Yes, the module is installed for all users on the workflow server. I uninstalled and reinstalled it, just to make sure that wasn't the issue.

  • Options
    Geoff_RossGeoff_Ross Cireson Consultant O.G.

    Hi Harold,

    I'm not sure why this is but my next step would be to grab that missing dll and register in the GAC on your workflow server.


  • Options
    Harold_HarrisHarold_Harris Customer IT Monkey ✭

    The dll has to be registered. I can run the script with multiple users and multiple ways on the workflow server. It only fails when ran as a powershell activity in SCSM.

Sign In or Register to comment.