Get-SPContentDatabase | %{Write-Output "- $($_.Name)”; foreach($site in $_.sites){write-Output $site.url}} |
Now let’s say you want to save this output to a .txt file, you can add “> C:\sitecollections.txt”.
The full command would be:
Get-SPContentDatabase | %{Write-Output "- $($_.Name)”; foreach($site in $_.sites){write-Output $site.url}} > C:\sitecollections.txt |
No comments:
Post a Comment