Advertisement
Guest User

Untitled

a guest
Jul 1st, 2012
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. PowerShell mkdir alias Set-StrictMode -Version 2. Strange bug. Why?
  2. Set-StrictMode -Version 2
  3. mkdir c:tmp1 # same with 'md c:tmp1'
  4.  
  5. c:tmp>powershell ".test.ps1"
  6.  
  7. The variable '$_' cannot be retrieved because it has not been set.
  8. At line:50 char:38
  9. + $steppablePipeline.Process($_ <<<< )
  10. + CategoryInfo : InvalidOperation: (_:Token) [], ParentContainsEr
  11. rorRecordException
  12. + FullyQualifiedErrorId : VariableIsUndefined
  13.  
  14. powershell ".test.ps1"
  15. powershell -File ".test.ps1"
  16.  
  17. $steppablePipeline.Process($_)
  18.  
  19. if (test-path Variable:Local:_) {
  20. $steppablePipeline.Process($_)
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement