Skip to content

Instantly share code, notes, and snippets.

View invoke-webrequest.ps1
$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 Mar 12, 2020
Powershell log shipping
View configGile.csv
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