The term 'Copy-PnPList' is not recognized as the name of a cmdlet

Mukesh Patil 0 Reputation points
2025-04-22T16:07:10.2866667+00:00

I am facing below issue while using pnp-powershell with SharePoint Online:

Copy-PnPList : The term 'Copy-PnPList' 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 line:1 char:1

  • Copy-PnPList
  • 
        + CategoryInfo          : ObjectNotFound: (Copy-PnPList:String) [], CommandNotFoundException
    
        + FullyQualifiedErrorId : CommandNotFoundException
    
    

both Powershell version and PnP Powershell are recently installed. is Copy-PnPList still available for use?

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Smith Pham 0 Reputation points
    2025-05-01T11:22:45.0766667+00:00

    It appears you're encountering an issue with the Copy-PnPList cmdlet in PnP PowerShell. The error message indicates that this cmdlet isn't recognized, which suggests one of several possibilities.

    The Copy-PnPList cmdlet was indeed available in older versions of PnP PowerShell, but it was removed in newer versions of the module. If you're using a recent installation of PnP PowerShell, this cmdlet is no longer available.

    Here are a few things to check:

    1. Verify which version of PnP PowerShell you're running:
         
         Get-Module PnP.PowerShell -ListAvailable
      
    2. The newer recommended approach is to use the Export-PnPListToSiteTemplate and Invoke-PnPSiteTemplate cmdlets to copy lists between sites.
    3. If you need this specific functionality, you might need to downgrade to an older version of PnP PowerShell where this cmdlet was still available.

    To copy a list in current versions of PnP PowerShell, you can use a site template approach:

    # Connect to source site
    Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/sourceSite" -Interactive
    # Export the list to a template
    Export-PnPListToSiteTemplate -List "YourListName" -Out "list-template.xml" -IncludeAllPages
    # Connect to destination site
    Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/destinationSite" -Interactive
    # Apply the template
    Invoke-PnPSiteTemplate -Path "list-template.xml"
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.