31 lines
1.5 KiB
PowerShell
31 lines
1.5 KiB
PowerShell
# Bypass Script Execution Policy
|
|
# Start-Process PowerShell -ArgumentList "-ExecutionPolicy Bypass", "-File", "C:\Scripts\Printers\01-Printer-Scripts.ps1"
|
|
|
|
# Array of script paths to execute
|
|
$scriptsToRun = @(
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-AspireAdmin.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-AspireHallway.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-AspireLobby.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-AspireOffice.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-CenterAnnex.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-CenterHallway.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-CenterOffice.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-CenterPsych.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-DQAnnex.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-WardHallway.ps1",
|
|
"C:\Scripts\Printers\02-Printer-Install\PrinterInstall-WardOffice.ps1"
|
|
)
|
|
|
|
# Iterate through the script paths and execute each one
|
|
foreach ($script in $scriptsToRun) {
|
|
try {
|
|
# Execute the script
|
|
& $script
|
|
|
|
# Add a delay or other actions between scripts if needed
|
|
Write-Host "Script '$script' executed successfully."
|
|
Start-Sleep -Seconds 5 # Adjust the delay as needed
|
|
} catch {
|
|
Write-Warning "Error executing '$script' $($_.Exception.Message)"
|
|
}
|
|
} |