标签: veeam

无法加载文件或程序集...但一开始就不行?

我有一个用于存档 Exchange 邮箱的 C# / .NET Windows 服务,并且我最近“打包”了 Veeam O365 Backup DLL,以便能够自动备份 Exchange Online 邮箱。

我将向您展示一些日志,显示该程序运行一段时间没有问题,然后开始突然失败并出现错误:

  • 无法加载文件或程序集“System.IO.Compression,Version=4.2.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。

...直到服务重新启动:

(参见Edit1,我的图片被覆盖了)

堆栈跟踪:

System.Management.Automation.CmdletInvocationException: Could not load file or assembly 'System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---> System.IO.FileLoadException: Could not load file or assembly 'System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly …
Run Code Online (Sandbox Code Playgroud)

.net c# powershell .net-assembly veeam

4
推荐指数
1
解决办法
9031
查看次数

使用 powershell 在现有 CSV 中添加列 CSV

我有一个 Powershell 脚本,它收集备份的大小,并将其导出到 CSV,我想知道是否可以将其添加到下一个 csv 列或 Excel 中。

我一直在查看文档,因为我认为它在 Excel 上看起来更好,但我无法再添加一列,我总是从头开始相信它。

$today = (get-date).Date
$backup = Get-VBRBackup | where {$_.info.jobname -eq "A. ProduccionInterna.Infraestructura Backup Copy"}
if ($backup) {
$backup.GetAllStorages() | where {$_.CreationTime.Date -eq $today} | select {$_.PartialPath}, {$_.Stats.BackupSize/1GB} |
export-csv -Path C:\Users\acepero\Documents\test.csv -NoTypeInformation -Delimiter ';'
}
Run Code Online (Sandbox Code Playgroud)

更新

我已经成功创建了一次新列,然后出现错误:

Select-Object : The property cannot be processed because the property "{$_.PartialPath}, {$_.Stats.BackupSize/1GB} , {$Session.BackupStats.DedupRatio} , 
{$Session.BackupStats.CompressRatio}" already exists.
Run Code Online (Sandbox Code Playgroud)

代码现在具有这种形式

$today = (get-date).Date
$backup = Get-VBRBackup | where {$_.info.jobname -eq "A. ProduccionInterna.Infraestructura Backup …
Run Code Online (Sandbox Code Playgroud)

shell powershell powershell-3.0 veeam

2
推荐指数
1
解决办法
7564
查看次数

标签 统计

powershell ×2

veeam ×2

.net ×1

.net-assembly ×1

c# ×1

powershell-3.0 ×1

shell ×1