Last active
December 19, 2017 09:49
-
-
Save andikrueger/4a4c68f6511ecb1dbcec09ac06008424 to your computer and use it in GitHub Desktop.
PowerShell DSC Script Resource to configure php_wincache.dll extension in php.ini file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Script PhpWinCache { | |
GetScript = { | |
return @{ | |
Result = "" | |
} | |
} | |
TestScript = { | |
$iniFile = "$($phpDirectory)\php.ini" | |
$currentStatus = Select-String -Path $iniFile -Pattern "^extension=php_wincache.dll" | |
Write-Debug "$($currentStatus)" | |
return ($null -ne $currentStatus) | |
} | |
SetScript = { | |
$iniFile = "$($phpDirectory)\php.ini" | |
Add-Content -Path $iniFile -Value "`r`nextension=php_wincache.dll" -Force | |
} | |
DependsOn = @("[File]PhpWinCache", "[File]PhpIni") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment