PowerShell Cmdlets

Top  Previous  Next

CopyMove 2010 includes a number of PowerShell Cmdlets to support CopyMove specific tasks from the PowerShell command-line or from PowerShell scripts. The following table provides an overview of the available cmdlets.

 

Cmdlets

Description

Copy-SPPItem

Copies SharePoint list items, documents and folders with full fidelity to any destination list folder within the same SharePoint farm.

Export-SPPItem

Exports SharePoint list items, documents and folders to a ZIP file.

Export-SPPList

Exports all SharePoint items in a SharePoint list to a ZIP file.

Get-CopyMoveFarmConfiguration

Gets the CopyMove configuration for the local SharePoint farm.

Get-CopyMoveListConfiguration

Gets the CopyMove configuration for a SharePoint list.

Set-CopyMovePermissionLevel

Gets the CopyMove permissions for a SharePoint permission level.

Get-CopyMoveSettings (Deprecated)

Gets the CopyMove farm settings or the CopyMove settings for a specific site collection.

Get-CopyMoveSiteConfiguration

Gets the CopyMove configuration for a SharePoint site collection.

Get-CopyMoveWebApplicationConfiguration

Gets CopyMove configuration for a SharePoint Web Application.

Get-SPPLicense

Gets the current license key in the farm.

Import-SPPItem

Imports list items, documents and folders from a ZIP file to SharePoint.

Move-SPPItem

Moves SharePoint list items, documents and folders with full fidelity to any destination list folder within the same SharePoint farm.

Remove-CopyMoveListConfiguration

Removes the CopyMove configuration for a SharePoint list.

Remove-CopyMoveSiteConfiguration

Removes the CopyMove configuration for a SharePoint site collection.

Set-CopyMoveFarmConfiguration

Sets CopyMove configuration settings for the SharePoint farm.

Set-CopyMoveListConfiguration

Sets CopyMove configuration settings for a SharePoint list.

Set-CopyMovePermissionLevel

Sets CopyMove permissions for a SharePoint permission level.

Set-CopyMoveSettings (Deprecated)

Sets CopyMove farm settings or CopyMove site collection settings.

Set-CopyMoveSiteConfiguration

Sets CopyMove configuration settings for a SharePoint site collection.

Set-CopyMoveWebApplicationConfiguration

Sets CopyMove configuration settings for a SharePoint Web Application.

Set-SPPLicense

Sets a new license key for the farm.

 

The cmdlets are registered with SharePoint on all servers when CopyMove is installed. Hereafter, they are immediately available for use within the SharePoint 2010 Management Shell. PowerShell scripts that are not executed from the Management Shell must first add the PowerShell Snapin Microsoft.SharePoint.PowerShell. The following PowerShell snippet loads it if necessary.

 

If ((Get-PsSnapin |?{$_.Name -eq "Microsoft.SharePoint.PowerShell"})-eq $null)
{
   Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Null
}

Important Note: The process account running a cmdlet must have full access to the SharePoint Content Database(s) that the cmdlet needs to retrieve data from or write data to. Read access is not enough as auditing, if enabled, will require the cmdlet to write to the content database(s).