2012-11-28 43 views
1

我需要找到創建SharePoint 2010組的用戶以及創建日期。我試圖使用「SharePoint Manager 2010」工具查找信息,但似乎沒有提供此類信息。我也嘗試過Powershell,但我似乎無法從中得到它(不太擅長Powershell)。檢索SharePoint組的創建者(用戶)和創建日期

這是可能的,或者我需要在某個地方開啓審計?

回答

1

就我所知,沒有辦法獲得它。即使通過C#,您也無法獲得像siteGroup["Author"]siteGroup[Created"]這樣的值。

namespace ConsoleApplication1 
{ 
    class Program 
    { 
     static void Main(string[] args) 
     { 
      using (SPSite spSite = new SPSite("http://DemoSP2010")) 
      { 
       using (SPWeb spWeb = spSite.RootWeb) 
       { 
        Console.WriteLine(spWeb.Title); 
        SPGroupCollection collection = spWeb.SiteGroups; 
        foreach (SPGroup siteGroup in collection) 
        { 
         Console.WriteLine(siteGroup.Owner.ToString()); 
         Console.WriteLine(siteGroup.Xml.ToString()); 
        } 
       } 
      } 
      Console.WriteLine("Done!"); 
      Console.ReadLine(); 
     } 
    } 
} 

的XML也只需提供以下信息:

  • ID
  • 名稱
  • 說明
  • OWNERID
  • OwnerIsUser
+0

您能解釋一下對我來說,ownerisuser意味着什麼,我無法在任何文檔中找到它,謝謝 – Des

+1

業主是首要的原則。因此它可以是用戶或系統帳戶或AD組(不知道了)。重要的是要知道,系統帳戶是不正常的用戶。超級權利,沒有電子郵件;) –

0

(IDK about 2010 ... but)在SharePoint 2013 on-prem上,以下Powershell將提供每個組(以及站點用戶)的創建日期,創建日期,修改日期和修改日期

Add-PSSnapin Microsoft.SharePoint.Powershell 

$spWeb = Get-SPWeb 'http(s)://YourSite/' 
$spList =$spWeb.SiteUserInfoList 
$oColl = $spList.Items 
$oColl | ForEach-Object { 
    Write-Host $_['ID'] $_['Name'] $_['Author'] $_['Created'] $_['Editor'] $_['Modified'] 
}