#1 04 Mar 2019 20:59

liturgist
Member
Registered: 04 Mar 2019
Posts: 4

Function Input Processing Methods > Write Methods

The "Write Methods" section needs to be reviewed.

None of them have a '-' after the verb. "WriteCommandDetail" does not appear to exist.

https:// ss64.com / ps / syntax-function-input.html

Offline

#2 04 Mar 2019 23:42

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 1,035
Website

Re: Function Input Processing Methods > Write Methods

That is intentional, those are Methods not cmdlets.

This is a confusing area because most of them do have matching cmdlets, e.g. you can call the write-error cmdlet or use the WriteError method.

In most cases the method does exactly the same thing as the cmdlet, the reason they exist is largely for performance - if you are dealing with a very large object or passing a large number of items through the pipeline then you may find one way is significantly faster than the other.

Offline

#3 05 Mar 2019 03:49

liturgist
Member
Registered: 04 Mar 2019
Posts: 4

Re: Function Input Processing Methods > Write Methods

My apologies. I will try to read more carefully in the future.

Offline

#4 05 Mar 2019 19:26

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 1,035
Website

Re: Function Input Processing Methods > Write Methods

Oh no need to apologise we are all still learning.

Im thinking I should add a page saying something about Methods vs cmdlets.

Offline

Board footer

Powered by FluxBB