$serviceContext = Get-SPServiceContext –Site http://mi_sitio.DOMINIO.com
$users =@("DOMINIO\User1","DOMINIO\User2","DOMINIO\User3")
foreach($user in $users)
{
$upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext)
$userProfile = $upm.GetUserProfile($user)
If(!$userProfile)
{
Write-Host "El perfil no existe"
}
elseif($profile)
{
if($profile.PersonalSite -eq $Null)
{
$userProfile.CreatePersonalSiteEnque($false)
Write-Host "Mysite creado para $user"
}
else
{
Write-Warning "$user ya posee un MySite"
}
}
}
Comentarios