2

Our public facing website has developed on sharepoint 2013, we have mysite feature enabled and around 40,000 user profiles are their in Mysite.

We now don't want any user to be able to browse Mysite option, for this purpose we have deleted the link button for my sites from home page but some users had saved their link so they are still able to view their site.

May I please know how to disable it permanently??

What I did is

Went to CA>Manage Web Application>User Profile Service Application>SetUp Mysites>Disable all the features >Saved

Still we are able to get mysite.

2
  • what is requirement, you dont want to create new one or you want to disable exisitng mysites as well?
    – Waqas Sarwar MVP
    Jan 17, 2017 at 0:48
  • I want so disable existing mysites sir. but there is no option to go in mysite site settings.
    – Asrar
    Jan 17, 2017 at 5:07

4 Answers 4

1

As per your information, this is not easy due to single web application with mixing of mysite and other sites.Couple of things you can try.

  • Lock all mysites in that web application as No access. No body can access mysite after this.

    $sites = get-spsite -WebApplication $webapp -Limit All

    foreach($site in $sites)
    
    {
        if($site -like "*/mysite/*") 
        {
            Set-SPSite -Identity $site -LockState "NoAccess"
    
            Write-Host "site status" $site.WriteLocked
        }
    }
    

Another option is hide the option from the user( i am not sure if that work).

  • Go to Central Administration > Application Management > Manage service applications > User profile service application
  • From the ribbon, Click “Manage User Permissions” under People.
  • On this page remove both group then no body will access the person page

Check this link for more info. http://howtosharepoint.blogspot.com/2010/11/hide-disable-my-site-my-profile-and.html

4
  • Thank you so much for your suggestion sir, second approach is not working. First approach I tried individually to make one user mysite to no access but still he is able to view sites/mysites/Pages/Grades.aspx This pages, which we actually dont want to show.
    – Asrar
    Jan 18, 2017 at 6:09
  • Alhamdulillah the problem has been resolved. I just went to the Central Administration>Configure Quotas and locks>Selected MySite url in the web application>Made it to NoAccess>Saved Now it's working as we wanted before, Dear Waqas sir thank you so much for your suggestion.
    – Asrar
    Jan 18, 2017 at 6:42
  • The lockstate was something new to me! Nice. :) Jan 18, 2017 at 8:10
  • Yeah for me too :)
    – Asrar
    Jan 18, 2017 at 12:03
3

Simply open the SharePoint 2013 Management Shell and run the following command:

Disable-SPFeature 'MySite'

Please note that this is a Farm feature, not a Site Collection feature. Be sure you are targeting the right Farm if you have multiple ones. If you make a mistake, you can always re-enable it using:

Enable-SPFeature 'MySite'
1

As all the sites are still available, you should be able to add a security group with all your users / the SharePoint group called "Everyone" to your MySite webapplication and give them the permission "Deny All - Has no access."

While they will only get an access denied message while trying to browse their site, you should set up a redirection in IIS to redirect your users somewhere else explaining why MySite is disabled.

enter image description here

13
  • Thank you so much for your response, Can u please tell me from where to create this group it's actually confusing me???
    – Asrar
    Jan 16, 2017 at 16:01
  • The group above is created by SharePoint. You could create a security group in your AD and add here as well. Jan 17, 2017 at 7:28
  • but that reflects even in public facing site I guess.
    – Asrar
    Jan 17, 2017 at 7:58
  • That's a good point, but do you have your mysites as a separate web application per Microsofts recommendation? Or do you share a webapplication for content and mysites? Jan 17, 2017 at 8:10
  • Unfortunately that is the problem we have, if we would have separate web application then at least we would have detached the database. Yes it is available in same web application where our public facing website is available.
    – Asrar
    Jan 17, 2017 at 8:12
0

The below MySite feature in Farm level to prevent the redirection in Created/Modified by in list/libraryand user name links in list/library/user/groups/share but the redirection from Site Actions (About Me) should be handled using JQuery/JavaScript.

Disable-SPFeature -Id 69cc9662-d373-47fc-9449-f18d11ff732c

More details check this blog!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.