通行证日期变量为在PowerShell中

通行证日期变量为在PowerShell中

问题描述:

隶数据迁移作业日期参数我有以下powershell脚本传递$dateMinusThirty变量作为参数传入scribe数据迁移作业:通行证日期变量为在PowerShell中

$dateMinusThirty = Get-Date (Get-Date).AddDays(-30).ToString('s') -Format d; 

.\TWorkbench.exe "D:\filePath.dts" /VCreatedBefore="DATEVALUE($dateMinusThirty)" /RS 

的日期是我需要它,抄写员打开,但立即崩溃

我正确地做到这一点?

正确的语法如下:

$dateMinusThirty = Get-Date (Get-Date).AddDays(-30).ToString('s') -Format d; 

.\TWorkbench.exe "D:\filePath.dts" /VCreatedBefore="DATEVALUE(\""$dateMinusThirty\"")" /RS