Hi, I am trying to write a Powershell script which will compile a selection of objects in our Development DB, before exporting them.
I am trying to make this part of a bigger script which we can then run for deployments.
Currently I get an error when using Invoke-Command to remotely compile the objects.
The error relates to not being able to Login to the SQL server, even if I use Get-Credential in the script block which is being run on the server.
Has anyone experienced this before? Or found a solution to this problem?
0
Answers
The CompileNAVApplicationObject cmdlet is imported using the NAV module "Microsoft.Dynamics.Nav.Model.Tools.psd1'' (in the RoleTailored Client folder)
I'm not sure if I explained my issue correctly, so I should probably include code examples...
This is the part of the script I am using, the first part updates the Version List, by running a codeunit. The second is the part where I am getting the error. (When trying to run "Compile-NAVApplicationObject")
This is the part where I am getting the error relating to logging in to the SQL server.
The credentials that you use must be credentials of a user that has access to the database on SQL level - so maybe not a NAV user. I think this should be the same user account that is used to run the NAV service.