How to revert back following command Get-SPFeature | ? { !$_.Scope } | % { $_.Delete() } in SharePoint 2019

Tahir Khan 21 Reputation points
2022-10-26T06:28:20.743+00:00

By Mistake, I run this Powershell command on SharePoint Farm Get-SPFeature | ? { !$.Scope } | % { $.Delete() }.

After running this command the site setting link or header of SharePoint Master Page also disappears when I use this URL HTTPS://<MYSite>/_layouts/15/settings.aspx the page not showing the feature links, also when I run individual URL like HTTPS://<MySite>/_layouts/15/user.aspx the page displayed it's mean the all links are working. effect of this command is site setting disappears and all the links available on the Site Setting Page disappear.

When I run the FarmAdministration tool it appears in Cleanup Items, can anyone help me how to revert this command?

Thanks in advance.254157-orphanedfeature.png

TJ

Microsoft 365 and Office | SharePoint Server | For business
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 24,981 Reputation points Moderator
    2022-10-27T03:40:09.557+00:00

    Hi @Tahir Khan ,

    I reproduced this issue on my end and it was fixed by run SharePoint Configuration Wizard as administrator. The Site Setting Page reverted back to normal after the configuration process completed.
    254508-image.png

    ----------

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.