Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Issue with export-spweb if run it in invoke-command

$
0
0

Hi all.

Trying to make replication of some folders, lists and etc..

Trying to run Export-spweb in invoke-command and get this error:

Invoke-Command-Computer"spfe01.contoso.loc"-ScriptBlock{

Add-PSSnapinMicrosoft.SharePoint.PowerShell# -ErrorAction SilentlyContinue

$web="https://portal.contoso.loc/IT/Microsoft"

#$section="lists\Tasks"

Export-SPWeb$web-Path"c:\temp\microsoft-tasks123sasdssss.cmp"-IncludeVersionsall-CompressionSize50-IncludeUserSecurity-force# -ItemUrl $section

}

Cannot find an SPWeb object with Id or Url : https://portal.contoso.loc/IT/Microsoft.

+ CategoryInfo : InvalidData: (Microsoft.Share...CmdletExportWeb:SPCmdletExportWeb) [E

xport-SPWeb], SPCmdletPipeBindException

+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletExportWeb

+ PSComputerName : spfe01.internal.dreamscapenetworks.com

When i run this command directly on "spfe01.contoso.loc" -all works fine. Tried use -credential$credentialbut didn't help.

Any advice?


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>