• Hi Ron,

    I got your script downloaded directly from Powershell Idera site. The script is working great through command prompt windows or Powershell window directly. However, it does not work when I am trying to schedule it into the sql server agent. Btw, I am new to the Powershell, so not sure what do I need to do beside putting in the job step and choose powershell. I also try to set the policy unrestricted, it still threw me the same error. Here is the error I have received.

    Executed as user: The job script encountered the following errors. These errors did not stop the script: A job step received an error at line 35 in a PowerShell script. The corresponding line is ' Backup-SSAS $serverInstance $backupDestination $retentionDays $logDir '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'TRAPPED: Cannot invoke this function because the current host does not implement it. ' A job step received an error at line 35 in a PowerShell script. The corresponding line is ' Backup-SSAS $serverInstance $backupDestination $retentionDays $logDir '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'TRAPPED: Cannot invoke this function because the current host does not implement it. ' A job step received an error at line 35 in a PowerShell script. The corresponding line is ' Backup-SSAS $serverInstance $backupDestination $retentionDays $logDir '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'TRAPPED: Cannot invoke this function because the current host does not implement it. ' A job step received an error at line 35 in a PowerShell script. The corresponding line is ' Backup-SSAS $serverInstance $backupDestination $retentionDays $logDir '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'TRAPPED: Cannot invoke this function because the current host does not implement it. '.

    I am running under SQL server 2008 and Powershell 1.0. It's just work without the sql server agent. Do I have to do anything before adding this script into the job steps? Can you advise? Your reply will be much appreciate as I am trying to set this up into all our SSAS environment here.