阅读目录
由于权限的设置,当文件被签出时导致别人不可见了,这对校验文件个数的人来说着实是件烦恼的事。幸好利用PowerShell,可以获取Site Collection下被签出的文件。
Resolution
Add-PSSnapin Microsoft.SharePoint.PowerShell function GetAllCheckOutFiles([string]$siteUrl){ $spSite=Get-SPSite $siteUrl $spSite.AllWebs|%{ $_.Lists|where{$_.BaseTemplate -eq "DocumentLibrary" -and $_.Hidden -eq $false}|%{ #Write-Host $_.ParentWeb.Url# $_.CheckedOutFiles |Select-Object {$_.Url,$_.CheckedOutByName}|Out-File c:\txtResult.txt -Append }; } $spSite.Dispose(); } GetAllCheckOutFiles("http://reus");
本博客为
木宛城主原创,基于
Creative Commons Attribution 2.5 China Mainland License发布,欢迎转载,演绎或用于商业目的,但是必须保留本文的署名
木宛城主(包含链接)。如您有任何疑问或者授权方面的协商,请给我留言。
本文转自木宛城主博客园博客,原文链接:http://www.cnblogs.com/OceanEyes/p/powershell-get-all-check-out-files.html,如需转载请自行联系原作者