How it works...

When any cmdlet reads an object through the pipeline, it reads the entire contents of the object. And any cmdlet that is designed to accept input through the pipeline picks the right property from the object, and then takes actions on the objects. In the case of this recipe, it was the Path property that was picked in order to identify the files to delete.

To know if a certain cmdlet accepts input from the pipeline, run Get-Help on the cmdlet with the Full parameter, and see if the value for Accept pipeline input? is true. The InputObject parameter of Where-Object, or the Path parameter of Move-Item are a couple of examples.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.213.128