3

I have a SQL Server on IaaS Windows 2016 using the default marketplace image (SQL Server 2016 SP1 Enterprise on Windows Server 2016) today, after fighting the East US region problem yesterday which was resolved. In Azure Cloud Shell, I type Enter-AzureRmVm -name <servernamehere> -region <regionNameHere>

It then prompts me for a users. Since I have not joined the VM to a domain, I use <serverName>\user with the local use that I set up when I made the VM. It then prompts for password and I have copy-pasted it from notepad to ensure it is accurate. It thinks for a second, gives no error, and then goes back to the PS Azure prompt (the same one I was in) - when querying for hostname it shows the ephemeral name given to the cloud prompt, not the VM name.

Now I have been able to use this in the past (Enter-AzureRmVM) so I am guessing it is some type of bug happening, but I would welcome any commentary if I am doing something obviously wrong.

Aravinda
  • 1,121

1 Answers1

3

I test in my lab, I use the same image, I get the same result with you. It seems the command does not work with this image. I test on image Windows Server 2016, the command works.

enter image description here

Now, PowerShell in Azure Cloud Shell is in preview, you could give feedback on this link.

On Azure Cloud Shell, if you want to connect your VM, maybe you could use Enter-PSSession

winrm set winrm/config/client '@{TrustedHosts="*"}'
Enter-PSSession -ComputerName 13.65.89.136 -Credential \shui

enter image description here

Note: You need open port 5985 on Azure NSG and Windows Firewall. Update from comment:

Currently, the cmdlet does not support image SQL Server 2016 SP1 Enterprise on Windows Server 2016. But according to my experience, it will be supported in the future.