I'm using SharePoint 2016 On-premises server, we have two main site collection, I need to get a list of orphaned users in each site collection.
I've come across this PowerShell script mentioned here which gives me a list of all users in my site collection, which is not meeting my requirement.
I want to get the list of Orphaned users(who are not part of the active directory) from SharePoint 2016 On-prem - using PowerShell in an excel format or txt format,
Please help me with some power-shell script