I am using a scheduled agent to connect to a SQl Server table in our company.When I run the agent from the workstation it runs fine.
We have a set up an Active Directory ID that we would want to use to authenticate to the SQL Server table.We want to use this ID through our scheduled agent.
.Provider = "SQLOLEDB"
.Server = "PR..."
.Database = "db"
.Metadata = "VW_..."
.Auth_Integrated = "SSPI"
When I tried to connect through the server agent we get:
ErrorRecord: HResult: 0x80040e4d
Description: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
We know the AD ID and password are valid.
Any help is appreciated.