I have found the custom lists in a particular site and I want to print the names to Excel. How do I do it?
You can pipe the output from your command to an .csv file:
FileToExecute.ps1 | Out-File C:\output.csv
Make sure you in your script file uses
Write-Host when printing your output.
Use the following Command:
$spWeb = Get-SPWeb SiteUrl $spWeb.Lists | select Title | Export-CSV c:\Lists.csv
You can export any output of the powershell to a CSV. This is a built in function.