Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 13778

PowerShell SP bug? SPSite.Owner and SPSite.SecondaryContact are Null?

$
0
0

I ran a PowerShell script to get a list of the primary and secondary Site Collection Administors and found some site collections with no administrators listed:

PS C:\> get-spwebapplication http://sharepoint | select -ExpandProperty sites | select url, owner, secondarycontact

Url                                                  Owner                    SecondaryContact
---                                                  -----                    ----------------
http://sharepoint                                    SHAREPOINT\samc          SHAREPOINT\administrator
http://sharepoint/sites/RCWidgets2                   SHAREPOINT\samc          SHAREPOINT\administrator
http://sharepoint/sites/Training
...

Central Administration shows both admins.

A little C# Console application returns the expected (and correct) results for both Owner and SecondaryContact.

Only PowerShell shows these as missing.  (Reports them as Null)

The pattern I found was the Owner and SecondaryContact were missing on sites where the admins were changed from Site Actions, Site Setting in the site collection.

Am I missing something in how PowerShell reads the data?


Mike Smith TechTrainingNotes.blogspot.com my SP customization book


Viewing all articles
Browse latest Browse all 13778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>