Wednesday 24 April 2019

Cloud based Development Environment does not have admin user on LCS, how can I get the administrator password?

I found the below post regarding the admin account changes in latest versions.


As of platform update 12, customers will no longer have access to virtual machine (VM) admin accounts on development or build environments that are running in Microsoft subscriptions. This restriction only applies to new deployments of platform update 12 (or newer) environments, meaning that environments deployed before the update, but have been updated to platform 12, will still have admin access.
You can remote desktop (RDP) to these restricted environments using a non-admin user provided on the Lifecycle Services (LCS) environment page. This blog article contains more information on how to access these VMs: https://blogs.msdn.microsoft.com/lcs/2017/10/31/restricted-admin-access-with-platform-12-updates/
This post contains a list of commonly asked questions and answers that have been compiled by our product team, solution architects and support teams. 

Frequently asked questions

Q1: How can I install an AOT deployable package from the command line without being an Administrator on the VM?
A: Install an AOT deployable package using the -devinstall option. Keep in mind that this option requires a manual database synchronization which you can perform from the Visual Studio (VS) "Dynamics 365" menu.
Q2: Is the local runtime (web application) accessible when Visual Studio (VS) is not running?
A: Yes, IIS Express is an executable running as the current user, but when you close VS the XPPC agent will start regular IIS (not IIS Express) before it shuts down. This ensures that even when you log off or the machine reboots, the AOS and web site are accessible remotely. We recognize many people use these dev boxes as test machines and they expect the AOS to always be running, which can’t be done with IIS Express.
Q2: What about the other services?
A: You can restart Windows® services such as SQL Server, SSRS, SSIS, SSAS, Batch, MR, and IIS (the Windows® service, not iisreset.exe) when you RDP to the VM using the account provided on the LCS environment page.
Q4: Will I be able to clean up the service volume drive?
A: Yes, the user account provided in LCS has full access to the service volume drive, so you can clean up the monitoring data, etc.
Q5: What are the alternatives to the VMs that do not allow administrator access?
A: An Azure VM on a private Azure subscription or a local VHD still allow administrator access.
Q6: When using version control, a "get latest" in the VS source control explorer fails because files are blocked by the AOS. How do we start / stop IIS?
A: This is not related to the changes described in this article. You have to stop IIS Express. See the next question for more information.
Q7: What are the instructions for using IIS Express? Can I attach it to a debugger?
A: IIS Express, when started, shows an icon in the notification area (near the clock) where it shows all the running sites. You can stop if from that menu. A start in IIS Express will be triggered by some actions in VS (Such as opening the table browser or rebuilding your project), but you can also explicitly do it by selecting "Restart IIS Express" in the VS “Dynamics 365” menu (Available as of update 13).
Since IIS Express is running as the current user, the current user has the required permissions to attach it to a debugger. 
Q8: How to apply a VS license key that is not tied to the VS log-in account?
A: Entering a product key directly in Visual Studio is not supported. You should use Visual Studio subscription licensing and sign-in to Visual Studio with the email address (user account) associated with the license. Linking a Visual Studio license to a user account can be done by assigning an MSDN license to the user account or by assigning a license to the user account usinghttps://www.visualstudio.com/subscriptions-administration.
Q9: How to install additional DEV tools (e.g. Fiddler, Pepper, …)
A: This is not supported on restricted VMs, it is only supported on local dev VMs or cloud VMs running in a private Microsoft Azure subscription.
Q10: How to run PowerShell & CMD commands “as admin?”
A: This is not supported on restricted VMs, it is only supported on local dev VMs or cloud VMs running in a private Microsoft Azure subscription.
Q11: Is the Trace Parser tool supported on restricted VMs?
A: It is currently not supported but we are working on adding support for it.
Q12: Is maintenance mode supported?
A: Using Microsoft.Dynamics.AX.Deployment.Setup.exe as described in the maintenance mode article (https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/sysadmin/maintenance-mode) is not supported. LCS will be adding self-service support for all environments in the future. Until it is available in LCS, you can use the following to put the system in maintenance mode where you can change the license configuration as described in the article.
  1. RDP onto the Dev machine
  2. Login to SQL Server on the dev machine using the credentials from LCS for the axdbadmin user - then switch to the AXDB database and run the following command: update SQLSYSTEMVARIABLES SET VALUE = 1 where PARM = 'CONFIGURATIONMODE'
  3. Restart the “World Wide Web Publishing Service” service to reset IIS
  4. After it is restarted, it will be in maintenance mode
  5. Reverse the steps when done with maintenance mode activities - set the value to 0 and restart the “World Wide Web Publishing Service” service
Q13: Is installing a license deployable package supported?
A: Install an ISV license deployable package directly from LCS, there is no need to RDP to the development VM.  This should also work with the -devinstall option (See Q1) but a problem was found with this scenario and we are working on fixing it.
Q14: Can I upgrade my database to a new release without being an administrator on the VM?
This article describes how you can upgrade a Dynamics 365 for operations database to a new application release:https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/migration-upgrade/upgrade-data-to-latest-update/
This process requires you to be a local administrator on the VM when you execute the data upgrade package from the command line.
As of the February release of LCS, you can execute the data upgrade package directly from the LCS environment page of development environments, this does not require you to be an administrator on the VM.
Q15: What do I need to know if I am developing for Retail?
If you are developing for Dynamics 365 for Retail, refer to this topic for configuration steps and other important information: https://docs.microsoft.com/en-us/dynamics365/unified-operations/retail/dev-itpro/cloud-dev-box 

For more details please see below posts.

2 comments:

  1. Nice blog. You have provided such a useful informartion in this blog. Thanks for sharing.
    MS Dynamics Technical Online Training

    ReplyDelete
  2. Keeping the customer relationship intact is essential for the SaaS provider to maintain these revenue streams and to keep them flowing. free restream review

    ReplyDelete

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...