Forum Discussion
Attach and upgrade multiple content databases in SharePoint
Hi bjfentress ,
I suggest you to change your approach, think about Invoke-Parallel https://gallery.technet.microsoft.com/scriptcenter/Run-Parallel-Parallel-377fd430
this guy obteined really good results :)
Cheers,
Federico
- Feb 26, 2019Welcome :) Let me know :)
- bjfentressFeb 27, 2019Copper Contributor
FedericoPorceddu82 I have reviewed this function and have tried it out in the example where the function accepts an input (Database Names in my case from a text file) and then runs a script (Mounting those DB's in another script action) but it doesn't seem to work. It seems to have a problem when I try to run the script where the mount-spcontentdatabase command is:
Get-RunspaceData : The term 'Mount-SPContentDatabase' is not recognized as the name of a cmdlet, function,script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At E:\SharePoint\Scripts\Admin\Invoke-Parallel.ps1:543 char:13
+ Get-RunspaceData -wait
Any ideas?
- bjfentressFeb 27, 2019Copper ContributorI know the error is from running powershell without the add-psnapin Microsoft.sharepoint.powershell add-in, but in the Mount script I put in a line for this to apply.