{"id":1152,"date":"2021-05-13T10:37:04","date_gmt":"2021-05-13T15:37:04","guid":{"rendered":"https:\/\/zewwy.ca\/?p=1152"},"modified":"2021-05-13T10:37:04","modified_gmt":"2021-05-13T15:37:04","slug":"check-in-all-files-in-a-sharepoint-doc-library","status":"publish","type":"post","link":"https:\/\/zewwy.ca\/index.php\/2021\/05\/13\/check-in-all-files-in-a-sharepoint-doc-library\/","title":{"rendered":"Check in all Files in a SharePoint Doc Library"},"content":{"rendered":"<p>Here&#8217;s a real quick and dirty way to check in all files using SharePoint Powershell.<\/p>\n<p>Get the SharePoint Web application where the doc library sits.<\/p>\n<pre>$YourSPSite = Get-SPWeb https:\/\/sharepointweb.domain<\/pre>\n<p>Get the Document Library from the root (or as many sub layers as needed)<\/p>\n<pre>$DocLibrary = ($YourSPSite.RootFolder.SubFolders[\"Name of Folder\"]).SubFolders[\"Name of Nested Folder\"]<\/pre>\n<p>After this call the checkin method for each file that is not in a checked in state<\/p>\n<pre>$DocLibrary.Files | ?{$_.CheckOutStatus -ne \"None\"} | foreach {$_.CheckIn(\"File Checked in by Admin\")}<\/pre>\n<p>If there are even more subfolders within this folder, they have to be taken care of by simply adding a nested .SubFolders call .EG.<\/p>\n<pre>$DocLibrary.SubFolders.Files | ?{$_.CheckOutStatus -ne \"None\"} | foreach {$_.CheckIn(\"File Checked in by Admin\")}<\/pre>\n<p>At this point it doesn&#8217;t matter what the sub folders are named it&#8217;ll go through each of their files within that &#8220;layer&#8221; of nested folders.<\/p>\n<p>Hope this helps someone<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a real quick and dirty way to check in all files using SharePoint Powershell. Get the SharePoint Web application where the doc library sits. $YourSPSite = Get-SPWeb https:\/\/sharepointweb.domain Get the Document Library from the root (or as many sub layers as needed) $DocLibrary = ($YourSPSite.RootFolder.SubFolders[&#8220;Name of Folder&#8221;]).SubFolders[&#8220;Name of Nested Folder&#8221;] After this call the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/zewwy.ca\/index.php\/2021\/05\/13\/check-in-all-files-in-a-sharepoint-doc-library\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Check in all Files in a SharePoint Doc Library&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","footnotes":""},"categories":[12,9],"tags":[352,353,150],"class_list":["post-1152","post","type-post","status-publish","format-standard","hentry","category-powershell","category-sharepoint","tag-checkin","tag-mass","tag-powershell"],"_links":{"self":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/1152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/comments?post=1152"}],"version-history":[{"count":1,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/1152\/revisions"}],"predecessor-version":[{"id":1153,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/1152\/revisions\/1153"}],"wp:attachment":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/media?parent=1152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/categories?post=1152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/tags?post=1152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}