Differences
This shows you the differences between the selected revisions of the page.
| 2017-02-03 | 2017-10-04 | ||
| explicit anchors (martin) | using variable expansion in strings in powershell (martin) | ||
| Line 166: | Line 166: | ||
| $dumpCommand = | $dumpCommand = | ||
| - | ("mysqldump --opt -u {0} --password={1} --all-databases | gzip > {2}" -f | + | "mysqldump --opt -u $dbUsername --password=$dbPassword --all-databases | " + |
| - | ···············$dbUsername, $dbPassword, $tempFilePath) | + | ············"gzip > $tempFilePath" |
| $session.ExecuteCommand($dumpCommand).Check() | $session.ExecuteCommand($dumpCommand).Check() | ||
| Line 183: | Line 183: | ||
| catch [Exception] | catch [Exception] | ||
| { | { | ||
| - | Write-Host ("Error: {0}" -f $_.Exception.Message) | + | Write-Host "Error: $($_.Exception.Message)" |
| exit 1 | exit 1 | ||
| } | } | ||
| </code> | </code> | ||