Posts Tagged 'email'

Finding out where SharePoint email alias is used

Recently, a question came up in the SharePoint TechNet forums regarding document libraries with incoming email enabled.  If you only know the name of the AD contact for the library, how can you find out which document library or list it’s pointing to? 

Here’s a straightforward PowerShell script which will iterate through every site collection in every web application and return the names and email aliases of every list that has an active email alias specified.


[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") | out-null

[void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$oContentService = [Microsoft.Sharepoint.Administration.SPWebService]::ContentService;

[Microsoft.SharePoint.Administration.SPWebApplicationCollection]$waColl = $oContentService.webApplications;

$waColl1 = $waColl | where-object {$_.IsAdministrationWebApplication -eq $FALSE}
write-host "WebApplication; Site Collection; List Title; List URL; EmailAlias"

foreach ($wa in $waColl1)
{

$sites = $wa.Sites

foreach ($obj in $sites)

{

$spSite = new-object Microsoft.SharePoint.SPSite($obj.URL)

$colWebsites = $spSite.AllWebs

foreach ($web in $colWebsites)
{

 $colLists = $web.Lists
 
 foreach ($list in $colLists)
 {

 if ( $list.EmailAlias -ne $null )
 {

 write-host  $wa.Name, ";", $obj.URL, ";", $list.Title , ";", $list.DefaultViewUrl, ";",  $list.EmailAlias

 }

 }

}

}

}

write-host "Finished."


RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Ben Curry’s Blog

  • I'm at the ATL users group Monday night, Nov 16th November 15, 2009
  • Upgrading to SharePoint Server 2010 November 3, 2009

RSS Bud Ratliff blog

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint PS Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Lori Gowin’s Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Greg Kamer’s Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 84,097 hits

Follow

Get every new post delivered to your Inbox.