# Finds the MyPractice properties file and sets the value "upload.days" to 28, then restarts the service to apply changes. # (NOTE: "upload.days=\d*" is a RegEx expression that will match the whole "upload.days" line in the properties file even if a numerical value hasn't been set yet.) $propertiesFilePath = "C:\MyPracticePlugin\mypracticeplugin.properties" Write-Host "Updating MyPracticePlugin configuration (upload.days)..." Start-Sleep 2 $temp = Get-Content $propertiesFilePath $temp -replace "upload.days=\d*","upload.days=28" | Out-File -FilePath $propertiesFilePath -Encoding utf8 Write-Host "Restarting MyPracticePlugin service..." Stop-Service -Name "MyPracticePluginService" -Force Start-Service -Name "MyPracticePluginService" Write-Host "Done!" Start-Sleep 2