Friday, January 27, 2017

json

https://gist.github.com/chrisobriensp/7685240 \\sdctwp0253\LivraisonIC\TopAppsMasterDataRepository-dev\2017-02-08_17-11-24_TopAppsMasterDataRepository-dev_1.0.2.44655\APPS\SPDeploy Add-PSSnapin Microsoft.Sharepoint.Powershell $site = Get-SPSite "SiteURL" $sitelists = foreach ($web in $site.AllWebs) { foreach($list in $web.lists){ $list }} $sitelists |select Title | Export-CSV C:\liststitles.csv Remove-PsSnapin Microsoft.SharePoint.PowerShell
http://topshare.corp.ponet/sites/cs1369-ResearchProjectTool/_layouts/15/WopiFrame.aspx?sourcedoc=/sites/cs1369-ResearchProjectTool/Shared%20Documents/Detailed%20Description%20of%20Business%20Need.docx&action=default
http://topshare.corp.ponet/sites/cs1369-ResearchProjectTool/_layouts/15/WopiFrame.aspx?sourcedoc=/sites/cs1369-ResearchProjectTool/Shared%20Documents/Specifications%20-%20Research%20Project%20Tool%20-%20Phase%202.docx&action=default # declare an array to store results $results = @() # fetch databases (only configuration and content DBs are needed) $databasesToQuery = Get-SPDatabase | Where-Object {$_.Type -eq 'Configuration Database' -or $_.Type -eq 'Content Database'} | Sort-Object –Property Name # for each database get spshelladmins and add db name and username to result $databasesToQuery | ForEach-Object {$dbName = $_.Name; Get-SPShellAdmin -database $_.id | Sort-Object $_.username | ForEach-Object {$results += @{$dbName=$($_.username)}}} # sort results by db name and pipe to table with auto sizing of col width $results.GetEnumerator() | ft -AutoSize