Collections:
Other Resources:
Object Type Match in Pipeline in Windows PowerShell
What will happen if the output object type does not match the input object type in a cmdlet pipeline in Windows PowerShell?
✍: FYIcenter.com
When you build a cmdlet pipeline, you have to make sure that
object types are compatible in the pipeline operation.
In other words, the output object type from the previous cmdlet must match the input object type
of the next cmdlet.
If the object type is not compatible in the pipeline operation, you will get an error. For example:
PS C:\fyicenter> get-date | stop-process
stop-process : The input object cannot be bound to any parameters
for the command either because the command does not take pipeline
input or the input and its properties do not match any of the
parameters that take pipeline input.
At line:1 char:12
+ get-date | stop-process
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (18:14:15 AM:PSObject)
[Stop-Process], ParameterBindingException
+ FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell
.Commands.StopProcessCommand
⇒ Cmdlet Pipeline Patterns in Windows PowerShell
⇐ Application Command in Pipeline in Windows PowerShell
2016-11-04, ∼2961🔥, 0💬
Popular Posts:
Error 126: Application Management Service Failed To Start. The Specified Module Could Not Be Found. ...
Can I disable Windows service "OracleServiceXE" to speedup my computer? Third party application serv...
A new tab called "Boot" is added in "msconfig" tool on Windows Vista and Windows 7. What is this "Bo...
How to configure Apache server to run PHP engine as a loaded module on Windows systems? If you have ...
How to use sc.exe command to create a new service? If you want to create a new service, you can use ...