基本上,我们希望将备份存储在 Azure Blob 存储中,但Invoke-DbaDbLogShipping需要一个$BackupNetworkPath. 我最接近这个的是 Azure 文件共享,但不幸的是端口 445 似乎被阻止了,所以我无法使用它。
我现在正在尝试修改Invoke-DbaDbLogShipping函数以将强制替换为$BackupNetworkPathAzure Blob 存储上传备份逻辑,但我遇到了一些问题:
Write-Message : The term 'Write-Message' is not recognized as the name of a cmdlet, function, script file, or operable program.
Test-FunctionInterrupt : The term 'Test-FunctionInterrupt' is not recognized as the name of a cmdlet, function, script file, or operable program.
Stop-Function : The term 'Stop-Function' is not recognized as the name of a cmdlet, function, script file, or operable program.
The property 'StatementTimeout' cannot be found on this object. Verify that the property exists and can be set.
为了避免这些错误,我复制/粘贴了 dbatools 内部辅助函数中的函数:
但我遇到了另一个问题[Sqlcollaborative.Dbatools.dbaSystem...]
例如:Unable to find type [Sqlcollaborative.Dbatools.dbaSystem.MessageLevel].
我之前尝试Import-Module dbatools在脚本中导入模块Invoke-DbaDbLogShipping,但没有帮助。