Pages

Friday, May 26, 2017

How to rename a D365 virtual machine, link it to LCS, and optionally join it to a domain - Dynamics 365 for Finance and Operations, Enterprise edition

Whenever I get a new D365 virtual machine, I need to rename it, link it to LCS, and join it to our domain. I kept forgetting what I did, so I wrote it down here to share.

I rename it because there are multiple copies of the VM on the same network, and joining to a domain should be obvious all of the benefits there.

So here are the steps that I perform to quickly do this, and if anyone has any other steps to add/modify, please let me know and I'll update the post. Follow carefully as each step is important.


  1. Connect to the VM, provision yourself (as usual)
  2. Go to Control Panel>System and Security>Security, click "Change Settings", and rename the machine to something unique.
  3. Restart VM
  4. Open Reporting Services Configuration Manager and connect to "localhost" or whatever you named your machine, and change the Database server so that it connects
  5. Open SQL Management Studio by doing "Run As Administrator", as the Local Admins security group is added but not the local administrator user.  Connect to SQL.
  6. Run these commands to get the name SQL thinks it is and the name you've used
    select @@SERVERNAME
    Select serverproperty('ServerName')
  7. Copy the old machine name and new machine name and replace it in these SQL commands and execute them
    --Run this with the updated names
    sp_dropserver 'MININT-S45GUTR'; --Old Name
    GO

    sp_addserver 'D365QDEVMAIN',LOCAL; --New Name
    GO
  8. Restart the machine
  9. In SQL (run as admin), run the steps in Step 6 again to verify both return the same new machine name result
  10. (Optional) The following steps are the optional LCS/Domain steps. Create a project in LCS that your D365 for Operations (or whatever it's called at the time of reading this) VM will connect to.
  11. (Optional) Download the LCS diagnostic installer under the "System Diagnostic" tile
  12. (Optional) Extract and run Setup. Choose "Create a new certificate" and enter whatever into the prefix. I usually just do the machine name.
  13. (Optional) This creates a certificate in the same directory as the installer, upload the certificate back into LCS under the same tile, then continue with the installer after it has been uploaded.
  14. (Optional) For the account/password I put in MachineName\Administrator and the administrator password. If you choose to use the local admin, it's important that you type the newly created machine name you chose or it doesn't always work.
  15. (Optional) There should now be a new icon on your desktop to launch the LCS diagnostic utility. Run this.
  16. (Optional) Put in the environment name and server name with your newly chosen name and put "AxDB" for the database name. Then click the buttons at the bottom of the tool in sequence.
  17. (Optional) When you get to step #3, your window may white-out and clear. Just choose the drop-down at the top under "Environment Name" and re-select your environment
  18. (Optional) Click "Generate Command" to get a copy/paste command that you can set up a scheduled task for so that LCS gets regular data. Copy the command and close the window. Mine was:

    "C:\Program Files\Microsoft Dynamics Lifecycle Services System Diagnostic Service\LCSDiagFXCollector.exe" "-Collect" "D365QDEVMAIN" "1"
  19. (Optional) Open "Task Scheduler" and create a new task and choose "Run whether user is logged on or not" and I choose "Run with highest privileges"
  20. (Optional) Choose the Triggers tab and setup a daily trigger (or whatever you want)
  21. (Optional) Choose the "Actions" tab, click New, and paste the entire command in the program/script window and click ok. It will prompt you to automatically fix it so just click yes.
  22. (Optional) Click OK to save the task and enter your user/password so that it can store it to run the task
  23. (Optional) Go back to LCS and under the same "System Diagnostic" tile, click on the "Environments" tab and verify your new environment is there and data is uploaded
  24. (Optional) Finally join it to your domain and restart.

And you are done!

24 comments:

  1. You have definitely made a very complicated and complex thing sound quite simple with the step by step instructions. Thanks for the helpful post and keep up the good work.

    ReplyDelete
  2. Excellent write-up. Very helpful.

    ReplyDelete
  3. Thanks. Very helpful.

    ReplyDelete
  4. when i tried it the add-ins like office addins stopped working

    ReplyDelete
  5. Thanks, This steps were very helpful to make our D365 onebox environment working.. Keep up the good work.

    ReplyDelete
  6. This comment has been removed by a blog administrator.

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete
  8. I have a problem with MR server after changed server name and followed this step.
    Can you suggest for this ?

    ReplyDelete
  9. Environment name is not detected in the Environment lookup. and when i click the button "Discover Environment" search button it shows error like "Enter valid Sql instance and database name". i have entered the my DB name as AxDB.

    Please help...

    ReplyDelete
  10. I would like to share it.Hope to see more articles from you. Thanks for the helpful post and keep up the good work. diagnostic medical imaging

    ReplyDelete
  11. This comment has been removed by a blog administrator.

    ReplyDelete
  12. Never thought that renaming something would be so complicated :)

    ReplyDelete
  13. I know this is one of the most meaningful information for me. And I'm animated reading your article. But should remark on some general things, the website style is perfect; the articles are great. Thanks for the ton of tangible and attainable help. Vacuum Emulsifying Mixer

    ReplyDelete
  14. I wonder how many pilots are traversing the sky right now feeling, as the industry lingo has it, 'fat, dumb and happy'? Here's my own experience with this conundrum of what I'll refer to as gauge-denial. Every pilot ought to be forced, on a regular basis, to confess his or her sins. I'd been a helicopter pilot for a very short time, but should have known better anyway.I wonder how many pilots are traversing the sky right now feeling, as the industry lingo has it, 'fat, dumb and happy'? Here's my own experience with this conundrum of what I'll refer to as gauge-denial. Every pilot ought to be forced, on a regular basis, to confess his or her sins. I'd been a helicopter pilot for a very short time, but should have known better anyway.torque wrench

    ReplyDelete
  15. Nice blog. You have provided such a useful information in this blog. Thanks for sharing.
    D365 Finance and Operations Training
    D365 Finance Training
    D365 Operations Training

    ReplyDelete
  16. Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. https://belltestchamber.com/environmental-chamber/desktop-environmental-climatic-temperature-test-chamber/

    ReplyDelete
  17. Beginning with certainly the most popular type of power tool, Dewalt's 20V drill-driver comes in two slightly different versions. The DCD780C2 compact drill-driver kit (with a 1.5-Ah battery) and the DCD980L2 premium drill-driver kit (with a 3.0-Ah battery, slightly larger than the 1.5). Additionally, the hammerdrill-driver and impact driver also come in these slightly distinct versions, but, I (kind of) digress. latest pole saw

    ReplyDelete
  18. Thank you for taking the time to publish this information very useful!DGBELL benchtop environmental chamber

    ReplyDelete
  19. Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing Impact Wrench Guides

    ReplyDelete
  20. Overall, you want to see what the general consensus is about a particular model. Maschinenbewertungen

    ReplyDelete