I have a server running Windows Server 2008 (not R2) and SQL Server 2008. I installed Powershell 2 and it works fine when running Powershell scripts. However when trying to run a Powershell script in a SQL Job it appears to run using Powershell v1 as it returns the following:
A job step received an error at line 1 in a PowerShell script. The corresponding line is 'Import-Module Pscx'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'The term 'Import-Module' is not recognized as the name of a cmdlet, function, script file, or operable program
How can I get it to run my scripts with Powershell v2?