Using Powershell - two 2013/2015 instances with diff. builds

CyberghostCyberghost Member Posts: 46
edited 2014-12-15 in NAV Three Tier
Hi


I've been looking into using Powershell to set up our customers systems, using the Example-1VM etc. examples.





Ideally, I want to set up any customer with a live and a test system. These would both have their own instances and importantly, the instances would be run from a different folder to each other. Initially, the instances would be the same build but as CU's are released, different builds would be able to be tested before going into the live setup.


I can see how to set up another instance using Powershell, but cannot work out how to create another instance based on a different Service folder. Does anyone know of a way of doing this and hopefully have an example?


Thanks in advance,


Chris
"When you eliminate the impossible, whatever remains, however improbable, must be the truth" - Sherlock Holmes

"God and developers are in a constant battle. Developments to make their applications more idiot-proof, and God to produce bigger idiots!"

Comments

  • vremeni4vremeni4 Member Posts: 323
    Hi,

    Interesting idea.
    I would use combination of PowerShell and batch files.
    For example from PowerShell you can call this batch command to create a NAV Instance in a particular folder.
    SC CREATE "MicrosoftDynamicsNAV$NavFrCronus7" binpath= "C:\Program Files\Microsoft Dynamics NAV\70\Service CronusFR\Microsoft.Dynamics.Nav.Server.exe" DisplayName= "Microsoft Dynamics NAV Server NAV_FR_CRONUS"
    

    in powershell
    $CMD = 'SC CREATE'
    $arg1 = 'MicrosoftDynamicsNAV$NavFrCronus7'
    $arg2 = 'binpath= "C:\Program Files\Microsoft Dynamics NAV\70\Service CronusFR\Microsoft.Dynamics.Nav.Server.exe"'
    $arg3 = 'DisplayName= "Microsoft Dynamics NAV Server NAV_FR_CRONUS'
     
    & $CMD $arg1 $arg2 $arg3
    

    This will create the instance after that you can use standard NAV powershell commandlets to do what you want.

    I hope this helps.
    Thanks.
  • CyberghostCyberghost Member Posts: 46
    Thanks
    "When you eliminate the impossible, whatever remains, however improbable, must be the truth" - Sherlock Holmes

    "God and developers are in a constant battle. Developments to make their applications more idiot-proof, and God to produce bigger idiots!"
Sign In or Register to comment.