{"id":4049,"date":"2012-05-16T17:58:27","date_gmt":"2012-05-16T09:58:27","guid":{"rendered":"http:\/\/www.sharepointboost.com\/blog\/?p=4049"},"modified":"2023-07-31T11:39:53","modified_gmt":"2023-07-31T03:39:53","slug":"exporting-a-site-list-or-document-library-using-windows-powershell","status":"publish","type":"post","link":"https:\/\/www.boostsolutions.com\/blog\/exporting-a-site-list-or-document-library-using-windows-powershell\/","title":{"rendered":"Exporting a site, list, or document library using Windows PowerShell"},"content":{"rendered":"<p>This Learning Note documents an example of using Windows PowerShell to export a site, list, or document library manually.<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Preparations<\/span><\/strong><strong>:<\/strong><\/p>\n<p><strong><\/strong>1. Run Windows PowerShell as Administrator.<\/p>\n<p>2. Before you begin, create a folder on the local computer or the network to store the backups.<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Actions<\/span><\/strong><strong>:<\/strong><\/p>\n<p><strong><\/strong>1. On the <strong>Start <\/strong>menu, click <strong>All Programs.<\/strong><\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-4050\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC1.png\" alt=\"\" width=\"386\" height=\"434\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC1.png 386w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC1-266x300.png 266w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a><\/p>\n<p><!--more-->2. Click <strong>Microsoft SharePoint 2010 Products<\/strong>.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC2.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-4051\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC2.png\" alt=\"\" width=\"374\" height=\"433\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC2.png 374w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC2-259x300.png 259w\" sizes=\"(max-width: 374px) 100vw, 374px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC2.png\" target=\"_blank\" rel=\"noopener noreferrer\"><\/a>3. Click <strong>SharePoint 2010 Management Shell<\/strong>.<\/p>\n<p>4. At the Windows PowerShell command prompt, type the following command:<\/p>\n<p><em>Export-SPWeb -Identity &lt;Site URL&gt; -Path &lt;Path and file name&gt; [-ItemUrl &lt;URL of site, list, or library&gt;] [-IncludeUserSecurity] [-IncludeVersions] [-NoFileCompression] [-GradualDelete] [-Verbose]<\/em><\/p>\n<p><em><\/em>I ran the above command in the below steps for the clearer understanding. ^_^<\/p>\n<p>(1) Input Export-SPWeb.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC3.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-4053\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC3.png\" alt=\"\" width=\"546\" height=\"271\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC3.png 546w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC3-300x148.png 300w\" sizes=\"(max-width: 546px) 100vw, 546px\" \/><\/a><\/p>\n<p>(2) Specify the Identity.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC4.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-4054\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC4.png\" alt=\"\" width=\"552\" height=\"273\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC4.png 552w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC4-300x148.png 300w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/><\/a><\/p>\n<p>(3) Specify the Path.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC5.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-4055\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC5.png\" alt=\"\" width=\"561\" height=\"273\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC5.png 561w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC5-300x145.png 300w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC5.png\" target=\"_blank\" rel=\"noopener noreferrer\"><\/a>5. Waiting for the command to complete, the backups should be in the target folder.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC6.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-4056\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC6.png\" alt=\"\" width=\"567\" height=\"340\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC6.png 567w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/Exporting-a-site-list-or-document-library-using-Windows-PowerShell-PIC6-300x179.png 300w\" sizes=\"(max-width: 567px) 100vw, 567px\" \/><\/a><\/p>\n<p><strong><span style=\"text-decoration: underline;\">Note<\/span><\/strong><strong>:<\/strong><\/p>\n<p>If the <strong>&lt;Site URL&gt;<\/strong>, <strong>&lt;Path and file name&gt;<\/strong>, or <strong>&lt;URL of site, list, or library&gt;<\/strong> contain any spaces, you must surround these in double quotes <strong>(&#8220;&#8221;)<\/strong> or else the Windows PowerShell command will return errors.<\/p>\n<p>This is only a short learning note. For more information, please see<\/p>\n<p><a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/ee428293.aspx\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/technet.microsoft.com\/en-us\/library\/ee428293.aspx<\/a><\/p>\n<p>Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This Learning Note documents an example of using Windows PowerShell to export a site, list, or document library manually. Preparations: 1. Run Windows PowerShell as Administrator. 2. Before you begin, create a folder on the local computer or the network to store the backups. Actions: 1. On the Start menu, click All Programs.<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[125],"tags":[367,368,369,366],"_links":{"self":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4049"}],"collection":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4049"}],"version-history":[{"count":6,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4049\/revisions"}],"predecessor-version":[{"id":9228,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4049\/revisions\/9228"}],"wp:attachment":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}