Power Shell 复制列表代码在主站点中有效但在子站点中无效?
Power Shell copy list code works in master site but not in subsites?
我正在使用强大的代码块 shell 将我的列表从一个站点复制到另一个站点。它在主站点上运行良好,但当我尝试在子站点上使用它时会抛出各种错误。有任何想法吗??我正在使用 SharePoint 2013 和 Power Shell 3.0。
我要从中复制的站点是 '$site = New-Object Microsoft.sharePoint.SPSite("http://something.com/")' and the site I want to copy to is '$destinationsite = New-Object Microsoft.sharePoint.SPSite("http://somethingelse.com/")'. This works at this level but when I try this I get errors - '$site = New-Object Microsoft.sharePoint.SPSite("http://something.com/doghouse/cats/")' to '$destinationsite = New-Object Microsoft.sharePoint.SPSite("http://somethingelse.com/cathouse/dogs")'.
SPSite object 指的是网站集。
网站集中的任何子网站都由 SPWeb objects 表示,而不是 SPSite 对象。
我正在使用强大的代码块 shell 将我的列表从一个站点复制到另一个站点。它在主站点上运行良好,但当我尝试在子站点上使用它时会抛出各种错误。有任何想法吗??我正在使用 SharePoint 2013 和 Power Shell 3.0。 我要从中复制的站点是 '$site = New-Object Microsoft.sharePoint.SPSite("http://something.com/")' and the site I want to copy to is '$destinationsite = New-Object Microsoft.sharePoint.SPSite("http://somethingelse.com/")'. This works at this level but when I try this I get errors - '$site = New-Object Microsoft.sharePoint.SPSite("http://something.com/doghouse/cats/")' to '$destinationsite = New-Object Microsoft.sharePoint.SPSite("http://somethingelse.com/cathouse/dogs")'.
SPSite object 指的是网站集。
网站集中的任何子网站都由 SPWeb objects 表示,而不是 SPSite 对象。