Get Users who is not having My site from the User Profiles in SharePoint using PowerShell Script in SharePoint 2013

InfoPath alternatives for form designing SharePoint

Using Powershell Script we can find whether the user is having the MySite Profile in SharePoint.

Also check out:
– Powershell Script to copy the Files from one Folder to another Folder in Site collection with Exact Fields and File Versions

– SharePoint 2013 Get SharePoint 2013 Site Collection Size using PowerShell

– Generate userprofile information PowerShell Script SharePoint 2013

The Script follows below.

if ((Get-PSSnapin “Microsoft.SharePoint.PowerShell” -ErrorAction SilentlyContinue) -eq $null) {
Add-PSSnapin “Microsoft.SharePoint.PowerShell”
$site = new-object Microsoft.SharePoint.SPSite(“Site URL”);
$Context = [Microsoft.SharePoint.SPServiceContext]::GetContext($site);
$upAttribute = “SPS-PersonalSiteCapabilities”
$PeopleManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($Context)
$profiles = $PeopleManager.GetEnumerator()
Foreach ($User in $profiles)
If ($User[$upAttribute].tostring() -ne $null)
Write-Host “User who is not having my site:” $User.AccountName -ForegroundColor Green
write-host “Finished.”

Similar SharePoint 2013 Tutorials

About Sravan kumar

I am a SharePoint Developer Working in Reputed MNC company Bangalore.

View all posts by Sravan kumar →

Leave a Reply