Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Simple PowerShell Commands to find the Orphan Objects
WhatsApp
Karthik Muthu Karuppan
10y
12.6
k
0
0
25
Blog
To get the orphan objects on the specific content database please execute the below commands:
$CDB = Get-SPContentDatabase -identity
"GUID of the content database"
$CDB.Repair($
false
) # $
false
to
return
the orphan objects
In order to clean the orphan objects, execute the below command:
$CDB.repair($
true
)
To get the GUID of specific content database attached to a web application, execute below commands:
$dbs = get-spwebapplication
"Webapplication URL"
$dbs.ContentDatabases
Now you will get list of content databases attached to the web application and its details. Grab the content database ID from here and use it in your command.
Simple powershell commands to find the orphan objects
Up Next
PnP PowerShell Commands for SPFx Extension Application Customizer
Ebook Download
View all
Configure MinRole Search and Cloud Hybrid Features in SharePoint Server 2016 and Office 365
Read by 1.6k people
Download Now!
Learn
View all
Membership not found