• Hello,

    There are some commands you cannot run from an SQL Server job because there is no console, for the example write-host cmdlet.

    http://blogs.msdn.com/b/mwories/archive/2009/09/30/the-use-of-write-host-and-sql-server-agent-powershell-job-steps.aspx

    Hope this helps.

    Regards.

    Victor.