将日期变量传递给 powershell 中的抄写数据迁移作业的日期参数
Pass date variable to date parameter for scribe data migration job in powershell
我有以下 powershell
脚本将 $dateMinusThirty
变量作为参数传递给 scribe
数据迁移作业:
$dateMinusThirty = Get-Date (Get-Date).AddDays(-30).ToString('s') -Format d;
.\TWorkbench.exe "D:\filePath.dts" /VCreatedBefore="DATEVALUE($dateMinusThirty)" /RS
日期正是我所需要的,Scribe 打开,但立即崩溃
我这样做正确吗?
正确的语法如下:
$dateMinusThirty = Get-Date (Get-Date).AddDays(-30).ToString('s') -Format d;
.\TWorkbench.exe "D:\filePath.dts" /VCreatedBefore="DATEVALUE(\""$dateMinusThirty\"")" /RS
我有以下 powershell
脚本将 $dateMinusThirty
变量作为参数传递给 scribe
数据迁移作业:
$dateMinusThirty = Get-Date (Get-Date).AddDays(-30).ToString('s') -Format d;
.\TWorkbench.exe "D:\filePath.dts" /VCreatedBefore="DATEVALUE($dateMinusThirty)" /RS
日期正是我所需要的,Scribe 打开,但立即崩溃
我这样做正确吗?
正确的语法如下:
$dateMinusThirty = Get-Date (Get-Date).AddDays(-30).ToString('s') -Format d;
.\TWorkbench.exe "D:\filePath.dts" /VCreatedBefore="DATEVALUE(\""$dateMinusThirty\"")" /RS