Tag Info

New answers tagged


Here is the script. It will get you primary administrators in an excel file for each site collection inside a web application. I am not able to get Secondary Owner Property though. $WebApplicationUrl = "https://peopletest.brookfield.com" $outputFile1 = "C:\TEMP\siteCollectionAdminsPrimary.csv" $outputFile2 = "C:\TEMP\siteCollectionAdminsSecondary.csv" ...


simple: Get-SpWebApplication http://www.contoso.com | Get-SPSite -Limit All | Select URL, ID, contentdatabase,Owner, SecondaryOwner | Export-CSV "f:\VLESites.csv" -NoTypeInformation


Try to use Owner instead of owneralias, and SecondaryContact instead of secondaryowneralias.


Lots of ways to do this in PS but maybe the easiest is Out-File: "$webURL,$($user.LoginName),$($user.Name),$($role.Type.ToString()),$($group.name)" | Out-File $logFile -Append You could Create the file at the beginning of your script something like this (you may want to add a date stamp to the file name): $log = "C:\path\to\log.csv" if (!(Test-Path ...

Top 50 recent answers are included