vinissh

foreach

Jan 22nd, 2021
953
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Exemplo de Foreach
  2.  
  3. cls
  4.  
  5. #Foreach ($numeros in 1,2,3,4,5,6,7,8,9) { echo $numeros}
  6.  
  7.  
  8. foreach($arquivos in Get-ChildItem){
  9.     echo $arquivos.fullName
  10.    
  11. }
  12.  
  13. #Mais exemplo
  14. Get-Process notepad+++
  15. Get-Process notepad++ | foreach kill
RAW Paste Data