Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have a simple question, how to determine with PowerShell if a SharePoint Site is a SPSite object or SPWeb?
I get all Site followed by user but some are SPSite.
You can use GetType() method
If it is web it gives you SPWeb otherwise SPSite
$currentSite = Get-SPSite -Identity $siteFollowed.Uri.AbsoluteUri if($currentSite.GetType().Name -eq "SPSite" ...
Required, but never shown