mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-24 02:04:07 +08:00
ffd39b2853
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'ForEach-Object' (alias is '%' or 'foreach') - Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Where-Object' (alias is '?' or 'where') - Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Select-Object' (alias is 'select') - Fix PSScriptAnalyzer warnings of type PSPossibleIncorrectComparisonWithNull. Essentially, $null has to be on the left-hand side when using it for comparison. - A Test in ParameterBinding.Tests.ps1 needed adapting as this test used to rely on the wrong null comparison - Replace a subset of tests of kind '($object -eq $null) | Should Be $true' with '$object | Should Be $null' |
||
---|---|---|
.. | ||
Apache | ||
apache-demo.ps1 | ||
readme.md |
Apache Management Demo
This demo shows management of Apache HTTP Server with PowerShell cmdlets implemented in a script module.
- Get-ApacheVHost: Enumerate configured Apache Virtual Host (website) instances as objects.
- Get-ApacheModule: Enumerate loaded Apache modules
- Restart-ApacheHTTPserver: Restart the Apache web server
- New-ApacheVHost: Create a new Apache Virtual Host (website) based on supplied parameters
Prerequisites
- Install PowerShell
- Install Apache packages
sudo apt-get install apache2
sudo yum install httpd
Note: Management of Apache requires privileges. The user must have authorization to elevate with sudo. You will be prompted for a sudo password when running the demo.