使用 PowerShell 查找在 SharePoint 中创建列表或库的人员
如果您想了解谁创建了 SharePoint 网站、列表或库:抱歉! SharePoint 用户界面无法实现!您无法在任何地方获取“创建者”或“创建于”值。
但 PowerShell 是我们的救星!让我们找出谁使用 PowerShell 创建了 SharePoint 列表:
查找谁使用 PowerShell 创建了列表或库
要查看谁在 SharePoint 中创建了列表,请使用以下 PowerShell 脚本:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Get the List and Web
$web = Get-SPWeb "https://portal.crescent.com/sites/Sales"
$list = $web.lists["Sales Docs"]
#Get Creator and Created date of the given List
Write-host "List Created by:"$List.Author
Write-host "List Created on:"$List.Created
使用 PowerShell 查找在 SharePoint 中创建文件的人:
以下是如何使用 PowerShell 查找在 SharePoint 中创建文件的人员:
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue
#variables
$SiteURL = "https://intranet.crescent.com/Sales"
$FileURL = "/sales/Shared%20Documents/Compliance%20Process.xlsx" #Relative URL
#Get the Web & File
$Web = Get-SPWeb -Identity $SiteURL
$File = $Web.GetFile($FileURL)
If($File.Exists)
{
Write-Host "Created By: " $File.Author
Write-Host "Modified On: " $File.TimeLastModified
Write-Host "Modified By: " $File.ModifiedBy
Write-Host "Created On: " $File.TimeCreated
}
else
{
Write-Host "File doesn't exist!"
}
相关文章:确定谁在 SharePoint 中创建了列表视图