Skip to content

Instantly share code, notes, and snippets.

View dvlin's full-sized avatar

David Lindin dvlin

  • Sweden
  • 23:11 (UTC +01:00)
View GitHub Profile
$sourcepath = 'https://installer.msi'
$destinationpath = "C:temppath"
$filename = "installer.msi"
$registry = "hklm:softwareapplicationname"
$logname = "eventlogname"
$logsource = "eventlogsource"
if (-not (Get-EventLog -list | Where-Object {$_.logdisplayname -eq $logname})) {
New-EventLog -LogName $logname -Source $logsource
}
@dvlin
dvlin / configGile.csv
Last active March 12, 2020 12:36
Powershell log shipping
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
configurationID;sourceDatabaseInstance;destinationDatabaseInstance;sourceBackupPath;destinationBackupPath;replicationPath;sourceDatabaseName;destinationDatabaseName;restoreOptions;sourceDatabaseLog;destinationDatabaseLog;FileCopyAges;parameterdatabas;servername;FileComparison
123;sourceSQL;destinationSQL;H:\MSSQL\BACKUP\sourceSQL\DB1;H:\MSSQL\BACKUP\sourceSQL\DB1;\\destinationsql\MSSQL$\BACKUP\sourceSQL\DB1;DB1;DB1;recovery;;none;none;none;sourceSQL;File