Now when we’re at it .. It might be interesting to also start a development client from PowerShell.
Why would it be?
Well, just suppose you’re creating a merge-script. And in case of conflicts, you want to:
- Set up a new database
- Import the merged objects, including conflicts
- Open the Development Environment to start solving conflicts
Just an example .. I’m using it now for a few scripts, so 😉
The script
function Start-NAVIdeClient { [cmdletbinding()] param( [string]$ServerName, [String]$Database ) if ([string]::IsNullOrEmpty($NavIde)) { Write-Error "Please load the AMU (NavModelTools) to be able to use this function" } $Arguments = "servername=$ServerName, database=$Database, ntauthentication=yes" Write-Verbose "Starting the DEV client $Arguments ..." Start-Process -FilePath $NavIde -ArgumentList $Arguments }
As you can see .. Not really “hocus pocus”. To make it easy on me, I’m re-using the $NAVIDE-variable that comes with the AMU (Application Merge Utilities – the PowerShell CmdLets for merging Dynamics NAV objects). If you didn’t load it yet, I’m giving the error that opening the client isn’t possible because you haven’t loaded them yet. Obviously, you can change this easily to your own needs :-).
Enjoy!
1 ping
[…] Continue reading » […]