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
DiskPart -s "c:\AttachMyVHD.s" |
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
function Mount-Codebox | |
{ | |
$scriptFile = “D:\VBox\HardDrives\AttachVHD.cmd” | |
& $scriptFile | |
} |
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
function Exists-Drive ($driveletter) | |
{ | |
$drive = New-Object System.IO.DriveInfo($driveletter) | |
$drive.DriveType -ne 'NoRootDirectory' | |
} |
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
SyncToyCmd –R “MyBackupPlan” |
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
function Run-SyncToy ($backupPlan) | |
{ | |
$Exe = "C:\Program Files\SyncToy 2.1\SyncToyCmd.exe" | |
& $Exe -R $backupPlan | |
} |
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
Clear-Host | |
# Decleare variable to hold the service name | |
$serviceName = "MSSQL`$SQLEXPRESS" | |
# Where the log file will be stored | |
$logHome = "D:\Amr\Backup\BackupLogs\" | |
# Get timestamp | |
$timeStamp = Get-Date -Format "yyyy-MM-dd HH-mm-ss" |
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
#if DEBUG | |
ILog log = LogManager.GetLogger("Logger"); | |
log.Debug("Message"); | |
#endif |
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
AppLogger.Logger.SuppressErrors = false; |
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
#if DEBUG | |
using log4net; | |
using log4net.Config; | |
#endif |
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
<conversionPattern value='* %date – [%thread] – %-5level – %logger – %message%newline' /> |