X-Git-Url: https://git.p6c8.net/dsmonrot.git/blobdiff_plain/1393228635062138984a33279aadb8f5e77dbed6..d76d903b4f6a1963cd7dbdab4bf130d5c03514a9:/dsmonrot.ps1?ds=sidebyside diff --git a/dsmonrot.ps1 b/dsmonrot.ps1 index 0323afb..c0ee230 100644 --- a/dsmonrot.ps1 +++ b/dsmonrot.ps1 @@ -134,12 +134,12 @@ if($smbDrive) { $secSmbPassword = $smbPassword | ConvertTo-SecureString -asPlainText -Force $smbCredential = New-Object System.Management.Automation.PSCredential($smbUser, $secSmbPassword) - New-PSDrive -Name $smbDrive -PSProvider "FileSystem" -Root $smbPath -Credential $smbCredential -Persist -ErrorAction Stop + New-PSDrive -Name $smbDrive -PSProvider "FileSystem" -Root $smbPath -Credential $smbCredential -Persist -ErrorAction Stop | Out-Null } else { Write-Host "Without credentials" - New-PSDrive -Name $smbDrive -PSProvider "FileSystem" -Root $smbPath -Persist -ErrorAction Stop + New-PSDrive -Name $smbDrive -PSProvider "FileSystem" -Root $smbPath -Persist -ErrorAction Stop | Out-Null } $smbConnected = $True @@ -177,7 +177,7 @@ if($errorMessages.Count -eq 0) { Write-Host "Creating directory $backupTargetDiff" try { - New-Item -ItemType directory -Path $backupTargetDiff -ErrorAction Stop + New-Item -ItemType directory -Path $backupTargetDiff -ErrorAction Stop | Out-Null } catch { Write-Host "Could not create directory $backupTargetDiff`: $_.Exception.Message" @@ -215,7 +215,7 @@ if($errorMessages.Count -eq 0) { Write-Host "Creating directory $backupTarget" try { - New-Item -ItemType directory -Path $backupTarget -ErrorAction Stop + New-Item -ItemType directory -Path $backupTarget -ErrorAction Stop | Out-Null } catch { Write-Host "Could not create directory $backupTarget`: $_.Exception.Message" @@ -228,7 +228,7 @@ if($errorMessages.Count -eq 0) { Write-Host "Creating directory $backupTargetFull" try { - New-Item -ItemType directory -Path $backupTargetFull -ErrorAction Stop + New-Item -ItemType directory -Path $backupTargetFull -ErrorAction Stop | Out-Null } catch { Write-Host "Could not create directory $backupTargetFull`: $_.Exception.Message"