A collection of PowerShell scripts for automating various tasks across different products and vendors.
This repository contains PowerShell scripts designed to automate routine tasks for various software products and hardware vendors. Each script is organized by vendor/product category and may include detailed documentation for easy implementation.
More details about each script can be found on my website.
- Windows PowerShell 5.1 or PowerShell Core 7.x
- Vendor-specific modules for example VMware PowerCLI
-
Clone the repository:
git clone https://github.com/marcusfoelling/powershell-automation-scripts.git cd powershell-automation-scripts
-
Set execution policy (if needed):
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
Install required modules for example VMware PowerCLI
Install-Module -Name VMware.PowerCLI
The script may include:
- Purpose: What the script does
- Requirements: Prerequisites and dependencies
- Parameters: Input parameters and their descriptions
- Examples: Usage examples with sample output
- Notes: Important considerations and limitations
<#
.SYNOPSIS
Brief description of what the script does
.DESCRIPTION
Detailed description of the script's functionality
.PARAMETER ParameterName
Description of the parameter
.EXAMPLE
PS> .\script-name.ps1 -Parameter "Value"
Example of how to use the script
.NOTES
Author: Your Name
Version: 1.0
Last Modified: Date
#>- Active Directory tasks
- Microsoft System Center Operations Manager (SCOM) tasks
- Windows Server configuration
- vCenter automation and configuration
- ESXi host management and configuration
- Virtual machine operations and configuration
- tbd
- Dell server management
- HP device automation
- System health monitoring
- Troubleshooting
- Reporting
- tbd
- Test First: Always test scripts in a development environment before production use
- Credentials: Never hardcode credentials; use secure methods like credential objects
- Logging: Some scripts includes appropriate logging functionality
- Error Handling: Scripts may or may not include comprehensive error handling and rollback procedures
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-script) - Follow the established script format and documentation standards
- Test your script thoroughly
- Submit a pull request with detailed description
- Use approved PowerShell verbs
- Include comprehensive help documentation
- Add error handling and logging
- Test on multiple PowerShell versions where applicable
- Create an issue for bug reports or feature requests
- Check existing issues before creating new ones
- Provide detailed information including PowerShell version and error messages
Disclaimer: These scripts are provided as-is. Always review and test scripts before using them in production environments. The author is not responsible for any damage or data loss resulting from the use of these scripts.