Step A - try to delete a list
"My List Name"
Step B - toggle list cannot be deleted error
$list = $w.Lists["My List Name"]
$list.AllowDeletion = $True
The delete command will now be visible on your list settings again and you'll run the line below: