Gwith

test

May 9th, 2014
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. $obj = [pscustomobject]@{}
  2.  
  3. function test{
  4. param(
  5. [parameter(mandatory=$True)]
  6. [string]$obj
  7. )
  8. begin{
  9. $obj.name = Read-Host 'tell me your name'
  10. }
  11. process{
  12. Write-Host $obj.name
  13. }
  14. end{
  15. }
  16. }
  17.  
  18. $test
Advertisement
Add Comment
Please, Sign In to add comment