Advertisement
hl2guide

Batch Run PS1 - PowerShell

Feb 10th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Runs a batch of PowerShell scripts
  2.  
  3. Set-Location $PSScriptRoot
  4.  
  5. $scriptFilesArray = (
  6. '1.ps1',
  7. '2.ps1'
  8. )
  9. foreach($scriptFile in $scriptFilesArray)
  10. {
  11.     & "$PSScriptRoot\$scriptFile"
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement