It’s pretty easy to run Microsoft Dynamics NAV (RTC or otherwise) as another user while you’re inside the domain (shift right click on most Windows machines to find a “Run as another user” option, if you did not know).
We had a situation come up where, for training purposes, it was necessary to use a machine that was not part of the domain connect up to the training server’s NAV instance. But, no matter how many times you “Run as another user” and enter your domain credentials, there’s a lot of machinery behind the scenes that will grind to a halt and reject your credentials with little information to go on. A very clever admin might even try to setup a shortcut or batch file to use the runas to try to send domain credentials, which will also fail.
The good news is that you can fix this:
runas /netonly /user:[DOMAIN\User] [“NAV EXE path”]
The /netonly switch will magically make things behave. The application runs on the local machine with no issue, but when it talks to the network, it will use the credentials you provide it. You’ll get a Command Prompt when you run the command (via shortcut or batch file) asking for the password, so it’s not the pretty solution, but for someone, it’s the solution you need.
*This is obviously nothing I would recommend an organization make as part of their standard practice, I provide no warranty of safety, swim at your own risk, consult a NAV doctor if your queries last more than 10 minutes, etc
Hello,
I tried to create a ps script/bat file that does the following
Before running an exe (eg NAV RTC client), asks for credentials, and then OPENS the NAV client using those credentials …..
Unfirtunately my PS knowledge is minimum, and eventhough I searched o internet, couldn’t find a solution
Tried with -Credential (Get-Credential) -FilePath “\NAV RTC\.exe” -verb runas
but no success ….
Any output would be greatly appreciated …
Many thanks
Panagiotis
i think this might be what your looking for @Panagiotis Karaberis:
https://blogs.technet.microsoft.com/benshy/2012/06/04/using-a-powershell-script-to-run-as-a-different-user-elevate-the-process/
i ran quite a simple script to push a login prompt as a “no-reply” user for testing:
Start-Process “[*EXE FILE PATH*]” -Credential “[*DOMAIN*]\no-reply”
This worked without any issues with launching a NAV client as a different user 🙂