Hi,
I have a SQL Agent job that runs a powershell script. It was running fine until I applied the SQL Server 2016 SP2 CU2 on top of SQL Server 2016 SP1. The error I am getting is :
New-WebServiceProxy : The term 'New-WebServiceProxy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I can run the script from powershell or by launching SQLPS but this results in error whenever I run it through SQL Agent job. I am not sure what changed. The job step has been configured to run as type "Operating System CmdExec" and has been running run good since a long time.
Command that I am running is:
powershell.exe -Noninteractive -executionpolicy bypass "powershell -c D:\temp\RunQuery.ps1"
Name Value ---- -----
PSVersion 5.0.10586.117
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.117
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Has anyone had or seen this issue before?
Thanks.