0

I have the following powershell script that passes the $dateMinusThirty variable as parameter into scribe data migration job:

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

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

The date is how I need it, Scribe opens, but immediately crashes

Am I doing this correctly?

J.S. Orris
  • 4,653
  • 12
  • 49
  • 89

1 Answers1

1

The correct syntax is the following:

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

.\TWorkbench.exe "D:\filePath.dts" /VCreatedBefore="DATEVALUE(\""$dateMinusThirty\"")" /RS 
J.S. Orris
  • 4,653
  • 12
  • 49
  • 89