Powershell
Table of Contents
PowerShell Automation Scripts #
A collection of PowerShell scripts for automating various tasks across different products and vendors.
Overview #
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.
Getting Started #
Prerequisites #
- Windows PowerShell 5.1 or PowerShell Core 7.x
- Vendor-specific modules for example VMware PowerCLI
Installation #
-
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
Script Documentation #
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
Example Script Header: #
<#
.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
#>
Categories #
Microsoft Products #
- Active Directory tasks
- Microsoft System Center Operations Manager (SCOM) tasks
- Windows Server configuration
VMware Products #
- vCenter automation and configuration
- ESXi host management and configuration
- Virtual machine operations and configuration
Network Equipment #
- tbd
Hardware Vendors #
- Dell server management
- HP device automation
Generic Tools #
- System health monitoring
- Troubleshooting
- Reporting
- tbd
Important Notes #
- 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
Contributing #
- 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
Contribution Guidelines #
- Use approved PowerShell verbs
- Include comprehensive help documentation
- Add error handling and logging
- Test on multiple PowerShell versions where applicable
Support #
- 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.