A powerful PowerShell script for sending batch HTTP requests with parallel processing and real-time monitoring
- Features
- Requirements
- Installation
- Usage
- Configuration
- Examples
- Advanced Features
- Troubleshooting
- Contributing
- License
- Author
- Parallel Processing: Send multiple HTTP requests simultaneously with configurable concurrency
- Real-time Progress Bar: Beautiful gradient progress indicator with live statistics
- Multiple URL Support: Process requests to multiple URLs from a file or single URL input
- Performance Metrics: Track request rate, success/failure counts, and execution time
- Error Handling: Robust error handling with failure tracking and reporting
- Configurable: Easy-to-modify configuration variables at the top of the script
- Visual Feedback: Color-coded output with ASCII art header and detailed summaries
- Operating System: Windows 10/11, Windows Server 2016+
- PowerShell: Version 5.1 or higher
- Permissions: Ability to execute PowerShell scripts (see Installation)
- Network: Active internet connection for sending HTTP requests
Clone this repository or download the script directly:
git clone https://github.com/Ash1421/batch-invoke.git
cd batch-invokePowerShell may block script execution by default. You have two options:
Option A: Bypass for Single Execution (Recommended)
powershell -ExecutionPolicy Bypass -File ".\batch-request-invoker.ps1"Option B: Change Policy Permanently
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserCheck your PowerShell version:
$PSVersionTable.PSVersionEnsure it's 5.1 or higher.
- Open PowerShell
- Navigate to the script directory
- Run the script:
Method 1: Bypass execution policy (no admin required)
powershell -ExecutionPolicy Bypass -File ".\batch-request-invoker.ps1"Method 2: Direct execution (if policy already set)
.\batch-request-invoker.ps1- Follow the interactive prompts:
- Enter the total number of requests
- Specify max parallel requests
- Provide a URL or press Enter for default
β Total number of requests: 100
β Max parallel requests: 10
β URL (Enter for default): https://example.com
Edit the configuration variables at the top of the script:
$ENABLE_URL_FILE = $false # Enable/disable URL file feature
$DEFAULT_URL = "example.com" # Default URL when none providedWhen $ENABLE_URL_FILE = $true, you can create a urlfile.txt in the same directory as the script:
urlfile.txt example:
https://api1.example.com/endpoint
https://api2.example.com/endpoint
https://example.com/test
https://another-site.com
The script will cycle through these URLs for your requests.
# Run the script
.\batch-request-invoker.ps1
# Input:
Total number of requests: 50
Max parallel requests: 5
URL: https://httpbin.org/get# Configuration for stress testing
Total number of requests: 1000
Max parallel requests: 50
URL: https://your-api.com/health- Set
$ENABLE_URL_FILE = $true - Create
urlfile.txtwith your URLs - Run the script and choose 'y' when asked about urlfile.txt
The script displays a real-time progress bar with:
- Visual Progress: Gradient bar showing completion percentage
- Success Count: Number of completed requests
- Active Jobs: Current parallel requests in progress
- Failed Requests: Number of failed requests
- Request Rate: Current requests per second
- π£ Purple/Magenta: Headers and branding
- π’ Green: Successful operations
- π΄ Red: Failed requests
- π‘ Yellow: Active/in-progress operations
- π΅ Blue: Informational messages
- βͺ White: Primary data
After completion, you'll see:
- Total requests sent
- Successful vs failed requests
- Total execution time
- Average request rate (req/s)
Error: "cannot be loaded because running scripts is disabled"
Solution A (No admin required):
powershell -ExecutionPolicy Bypass -File ".\batch-request-invoker.ps1"Solution B (Permanent fix):
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser- Check your network connection
- Verify the target URL is accessible
- Reduce
maxParallelvalue to avoid overwhelming the server - Check if the target has rate limiting
- Increase
maxParallelfor faster execution (within reason) - Ensure your network bandwidth can handle the load
- Check target server response times
- Ensure
urlfile.txtis in the same directory as the script - Check file name spelling and extension
- Verify the file contains valid URLs (one per line)
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Add support for custom HTTP headers
- Implement POST/PUT/DELETE request methods
- Add response time tracking
- Create CSV export for results
- Add authentication support (Bearer tokens, Basic Auth)
- Implement retry logic for failed requests
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- β Commercial use
- β Modification
- β Distribution
- β Patent use
- β Private use
β οΈ Must disclose sourceβ οΈ Must use same licenseβ οΈ Must state changes- β Liability
- β Warranty
Key Point: Any modifications or derivative works must also be licensed under GPL v3 and made open source.
@Ash1421
- GitHub: @Ash1421
- Version: 2.3.8
- Built with PowerShell's powerful job management system
- Inspired by the need for simple load testing tools
- Thanks to the PowerShell community for best practices
- Load Testing: Test your application's performance under load
- API Testing: Validate API endpoints with multiple requests
- Health Checks: Verify service availability across multiple endpoints
- Stress Testing: Determine system breaking points
- Warm-up: Prime caches and connections before production load
This tool is designed for testing your own services or services you have permission to test. Unauthorized load testing or stress testing of third-party services may be illegal and is strictly prohibited. Always obtain proper authorization before testing any system.
If you find this tool useful, please consider giving it a β!
Made with π by @Ash1421