PowershellExcercises/1 - Basics/to-do-text-file-through-script/to-do-text-file-through-script.ps1

5 lines
No EOL
234 B
PowerShell

# Prompt the user and add their input to the textfile.txt
# Adding instead of setting so previous items are not lost
$text = Read-Host "What item to you want to add to your to-do list? "
$text | add-Content $PSScriptRoot\textfile.txt