How did I do?*

Generate a list of directory contents in PowerShell

Create a file with the extension ".ps1" in the directory you want to summarise, paste the following script and save, then run by right clicking the file and selecting "Run with PowerShell".

$timeStamp = Get-Date -Format "yyyyMMddHHmmss"
$fileName = "list-$($timeStamp)"

Write-Host "Generating file..."

Tree ./ /F > "$($fileName).txt"
Write-Host "Generated file $($fileName).txt, opening..."
Invoke-Expression ".\$($fileName).txt"

# Get-ChildItem -Recurse | ConvertTo-Html -Property name | Out-File "$($fileName).html"
# Write-Host "Generated file $($fileName).html, opening..."
# Invoke-Expression ".\$($fileName).html"

You may need to change the script execution policy for your machine before running the script, this can be done by opening a PowerShell window and entering the following command:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Have a look through the details on execution policy options if you're not sure which are best. This policy uses RemoteSigned because it's a file you've created locally, rather than downloaded (technically), and limits the change to the current user.

This script generates a .txt file with the name "list-<current timestamp>" so a new one is created each time, then opens it automatically.

If you'd rather generate a HTML file instead, remove the "#" from the last three lines and add a "#" to each of the three above. The HTML version doesn't work quite as well as the tree structure isn't generated, so it's just a long, unstructured list.