Home Forums Programming Powershell Problem with Powershell and SQL Agent Job token RE: Problem with Powershell and SQL Agent Job token

  • Found it!!!

    I needed to include -DisableVariables in the Invoke-SQLCmd statement. Now it runs without erroring on the SQL Token.

    Invoke-SQLCmd -Query:$query -Database:'MSDB' -ServerInstance:$TargetSSISServerName -DisableVariables| Out-File $logfile -Append

    Wes

    Wes
    (A solid design is always preferable to a creative workaround)