Forum Discussion
Attach and upgrade multiple content databases in SharePoint
- 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.
- Feb 27, 2019
Hi bjfentress
try to add
Add-PSSnapin Microsoft.Sharepoint.Powershell
in Invoke-Parallel.ps1 too.
Cheers,
Federico