I'm trying to run SharePoint Export/Import from a remote machine. I can get it to work if I remote on to the individual box, but want to run it from another machine. I’ve enabled PSRemoting on each box, but I’m getting command not recognised errors. So, when I run:
Invoke-Command –ScriptBlock {Export-SPWeb –Identity $SourceIdentity –Path $Path –ItemURL $ItemUrl} –ComputerName $SourceComputer
I get:
The term Export-SPWeb is not recognised as the name of a cmdlet, function, script file or operable program. ......
I’ve tried running:
Invoke-Command –ScriptBlock {Add-PSSnapin Microsoft.SharePoint.PowerShell} –ComputerName $SourceComputer
Beforehand but it makes no difference. Is what I’m doing possible, and if so, what am I not doing?
Thanks

0 commentaires:
Enregistrer un commentaire