Powershell Object not being piped through to Functions

后端 未结 1 709
清歌不尽
清歌不尽 2021-01-23 13:17

I have two functions one creates a custom object which once done is piped to the next function. The problem is that the second function is not receiving my object correctly. Ins

相关标签:
1条回答
  • This is expected behavior. The begin {} block runs before any pipeline objects are encountered, so you have no access to any parameters that come in through the pipeline in your begin block.

    The process {} block is run once for each item, so the code you have in the begin block really needs to be put there (because it's specific to a single VM).

    0 讨论(0)
提交回复
热议问题