Collaboration-2-Go


Lösungen und Software-Entwicklung im Collaboration Umfeld, insbesondere Microsoft SharePoint, Microsoft Exchange und Microsoft Office.

Support


Mobil: +49 (152) 53 97 78 79
Mail: service@collaboration-2-go.de
Weitere Kontaktmöglichkeiten: Kontaktseite
Dekoration: Köln



Create SharePoint 2013 MySites
Created: 10.01.2014
Categories: SharePoint 2013; SharePoint Development; PowerShell

Create SP2013 MySites using an AD group and PowerShell:

$members = Get-ADGroupMember -Identity $adgroup -Recursive | sort name

foreach ($member in $members)
{
if ($upm.UserExists($member.SamAccountName))
{
  $profile = $upm.GetUserProfile($member.SamAccountName)
  $perssite = $profile.PersonalSite

  if ($perssite -eq $null)
  {
    $profile.CreatePersonalSite(1031)

    $perssite = $profile.PersonalSite
    if ($perssite -eq $null)
    {
      # do some error handling
    }
  }
}
}

    

Post a Comment!