What does `cmdlet Write-Output at command pipeline position 1` mean?

Viewed 3543

I've been experimenting with creating files in the visual studio terminal which defaults to powershell and have been using cat and echo to create new files, but both bring up the message:

cmdlet Write-Output at command pipeline position 1
Supply values for the following parameters:

echo then requests values for:

InputObject[0]:
InputObject[1]:
etc.

Whereas cat asks for:

Path[0]:
Path[1]:
etc.

What does this actually mean?

1 Answers

cat (Getting content) has a mandatory parameter of path which is why it is asking for to put the path to what file for example you would like to cat

Same principle applies to echo (writing output) as you're telling it to echo nothing it will prompt you for some input so it can actually run the command as intended.

In powershell [Parameter(Mandatory=$true)] Is what you can use yourself to test this out further

Related