$secSmbPassword = $smbPassword | ConvertTo-SecureString -asPlainText -Force\r
$smbCredential = New-Object System.Management.Automation.PSCredential($smbUser, $secSmbPassword)\r
\r
- New-PSDrive -Name $smbDrive -PSProvider "FileSystem" -Root $smbPath -Credential $smbCredential -Persist -ErrorAction Stop\r
+ New-PSDrive -Name $smbDrive -PSProvider "FileSystem" -Root $smbPath -Credential $smbCredential -Persist -ErrorAction Stop | Out-Null\r
}\r
else {\r
Write-Host "Without credentials"\r
\r
- New-PSDrive -Name $smbDrive -PSProvider "FileSystem" -Root $smbPath -Persist -ErrorAction Stop\r
+ New-PSDrive -Name $smbDrive -PSProvider "FileSystem" -Root $smbPath -Persist -ErrorAction Stop | Out-Null\r
}\r
\r
$smbConnected = $True\r
Write-Host "Creating directory $backupTargetDiff"\r
\r
try {\r
- New-Item -ItemType directory -Path $backupTargetDiff -ErrorAction Stop\r
+ New-Item -ItemType directory -Path $backupTargetDiff -ErrorAction Stop | Out-Null\r
}\r
catch {\r
Write-Host "Could not create directory $backupTargetDiff`: $_.Exception.Message"\r
Write-Host "Creating directory $backupTarget"\r
\r
try {\r
- New-Item -ItemType directory -Path $backupTarget -ErrorAction Stop\r
+ New-Item -ItemType directory -Path $backupTarget -ErrorAction Stop | Out-Null\r
}\r
catch {\r
Write-Host "Could not create directory $backupTarget`: $_.Exception.Message"\r
Write-Host "Creating directory $backupTargetFull"\r
\r
try {\r
- New-Item -ItemType directory -Path $backupTargetFull -ErrorAction Stop\r
+ New-Item -ItemType directory -Path $backupTargetFull -ErrorAction Stop | Out-Null\r
}\r
catch {\r
Write-Host "Could not create directory $backupTargetFull`: $_.Exception.Message"\r