Powershell action in Easymorph cannot import module PnP.PowerShell.
when I try to import module with
command, it throws following error message. Module has been installed from powershell and updated to latest version.
Could not load type ‘Microsoft.SharePoint.Client.SearchBoxInNavBarType’ from assembly ‘Microsoft.SharePoint.Client, Version=220.127.116.11, Culture=neutral, PublicKeyToken=71e9bce111e9429c’.
Has anybody experienced problems like this?
The error doesn’t seem to relate to EasyMorph. Does the PowerShell script work when executed not in EasyMorph but in the PowerShell terminal under the same user account?
yes it does.
And I found this thread
Not sure if easymorph can resolve this issue though.
The reason I am using the module was to download list of files from sharepoint. I could have used sharepoint list action in my project but the site is dynamic which I retrieved from a file. If there is a site which does not have a connection, I am in trouble. Instead using sharepoint static connections, I am using powershell to connect to sharepoint sites and download files to perform etl stuff.
If there is an alternative way to perform this kind of tasks in easymorph, please suggest.
How many SharePoint sites do you need to retrieve files from?
If you know the sites in advance, I would suggest creating 10-20 connectors to respective sites. In the “SharePoint command” action, the connector name can be specified using a parameter. Therefore, based on the file name you can calculate the necessary connector name to use. Then use the “Iterate” action to assign a column value to a parameter of the called module. In the called module, use the “SharePoint command” action with the parameter-specified connector.
Thanks @dgudkov for the suggestion. I will try that.