Advertisement
kazoda

powershell one liners

Jul 17th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # refer to
  2. # €http://uranuxtech.blogspot.jp/2014/07/powershell-here-string.html
  3. # €http://tech.guitarrapc.com/entry/2014/01/17/073338
  4.  
  5. PS > $tmplist2 = @'
  6. >> .VirtualBox
  7. >> Contacts
  8. >> Desktop
  9. >> Documents
  10. >> Downloads
  11. >> Favorites
  12. >> Links
  13. >> Music
  14. >> Pictures
  15. >> Saved Games
  16. >> Searches
  17. >> Videos
  18. >> VirtualBox VMs
  19. >> '@
  20. >>
  21. PS > $tmplist2 -Split "`n" | % { $_ + "  " + (Test-Path $_) }
  22. .VirtualBox  True
  23. Contacts  True
  24. Desktop  True
  25. Documents  True
  26. Downloads  True
  27. Favorites  True
  28. Links  True
  29. Music  True
  30. Pictures  True
  31. Saved Games  True
  32. Searches  True
  33. Videos  True
  34. VirtualBox VMs  True
  35.  
  36. PS > $tmplist2 -Split "`n" | % { $_ + " --> " + (Test-Path $_) }
  37. .VirtualBox --> True
  38. Contacts --> True
  39. Desktop --> True
  40. Documents --> True
  41. Downloads --> True
  42. Favorites --> True
  43. Links --> True
  44. Music --> True
  45. Pictures --> True
  46. Saved Games --> True
  47. Searches --> True
  48. Videos --> True
  49. VirtualBox VMs --> True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement