Run the Below Script in PowerShell,
Add - PSSnapin Microsoft.SharePoint.PowerShell - ErrorAction SilentlyContinue
$MySiteurl = "https://SPMY.Gowtham.com"
$ServiceContext = Get - SPServiceContext - site $MySiteHost
$UserProfileManager = New - Object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext)# Retrive all user Profiles
$UserProfiles = $UserProfileManager.GetEnumerator()# Loop through each profile
foreach($Profile in $UserProfiles)
{
if ($Profile.PersonalSite - eq $Null)
{
if ($Profile.PersonalSite - eq $Null)
{#
$UserProfile.CreatePersonalSite()
write - host "My Site Profile Created Successfully for :"
$Profile["AccountName"] - f Green
} else
{
write - host "Site Already Exists for the User:"
$Profile["AccountName"] - f Red
}
}
}Thanks for reading my blogs.