Advertisement
Guest User

Untitled

a guest
Sep 30th, 2024
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PS C:\Users\Administrator> cat C:\ranl.ps1
  2. $ErrorActionPreference = "Stop"
  3. cat c:\dummy | Get-NetIPAddress
  4. Write-Host 'We should never get here'
  5. PS C:\Users\Administrator> echo dummy > c:\dummy
  6. PS C:\Users\Administrator> C:\ranl.ps1
  7. Get-NetIPAddress : 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.
  8. At C:\ranl.ps1:2 char:16
  9. + cat c:\dummy | Get-NetIPAddress
  10. +                ~~~~~~~~~~~~~~~~
  11.     + CategoryInfo          : InvalidArgument: (dummy:PSObject) [Get-NetIPAddress], ParameterBindingException
  12.     + FullyQualifiedErrorId : InputObjectNotBound,Get-NetIPAddress
  13. We should never get here
  14. PS C:\Users\Administrator>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement