Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. function Trim {
  2. param(
  3. [Parameter(ValueFromPipeline=$true)]
  4. [object[]] $Val
  5. )
  6.  
  7. process {
  8. $r = $_
  9. if ($_ -is [string]) {
  10. $r = $r.Trim()
  11. }
  12. Write-Output $r
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement