Azure Deployment Nano Server Tutorial

Source: Internet
Author: User
Tags myvm

To help administrators with advanced technology previews and tests, Microsoft has already launched a nano-server deployment image on the Microsoft Azure platform, and we've been deploying the Nano server in Microsoft Azure and using PowerShell Make a brief introduction to remote management.

Microsoft Azure Deployment Nano Server

Now, we're deploying a Nano server in the Azure VM. (If you need to have Azure subscription, if not, you can apply for a free trial, application address: https://azure.microsoft.com/en-us/pricing/free-trial/.) )

1. Log in to Microsoft Azure portal-Click New-Search nano-find Windows Server 2016 Nano technical Preview 4 image

2. Deployment mode you can choose the Classic or the latest ARM mode

3. Configure the virtual machine size and data center after click to create. By default, this virtual opportunity automatically opens the PowerShell 5986 remote management ports and the RDP 3389 ports.

After the virtual machine is created, it will take a few minutes for Microsoft Azure to deploy this virtual machine for us, which can be managed remotely when the virtual machine's status is running.

Remote connection to Nano Server using PowerShell

Although Azure has enabled us to open RDP 3389 by default, it is not possible to connect to a virtual machine through Remote Desktop because the Nano server does not support the Terminal server role. However, the Nano Server supports PowerShell Remoting. Before supporting PowerShell cmdlets, you need to install Azure PowerShell module first.

On the local management side, open PowerShell with administrator privileges and use the WinRM command to add our newly created Azure Nano VM (public DNS name) to the WinRM trustedhosts list (if the management end is not in the same domain as the managed server) , you need to use this method for authentication).

Start-service WinRM

Set-item wsman:localhostclienttrustedhosts "Fl-nano.cloudapp.net"-concatenate–force

Note: The DNS name will be replaced with the Nano Server DNS name you deployed in Microsoft Azure.

If you want to view the WinRM trustedhosts list, you can use the following command:

Get-item wsman:localhostclienttrustedhosts

At this point, you can refer to the following PowerShell to remotely connect to the Nano Server in Azure:

$serviceName = ' Fl-nano '

$vmName = ' Fl-nano '

$subName = ' Azure pass '

Add-azureaccount

Select-azuresubscription–subscriptionname $subName

$myVM = Get-azurevm-servicename $serviceName-name $vmName

$WinRMCertificateThumbprint = ($myVM | Select-object-expandproperty VM). Defaultwinrmcertificatethumbprint

(Get-azurecertificate-servicename $serviceName-thumbprint $WinRMCertificateThumbprint-thumbprintalgorithm SHA1). Data | Out-file "${env:temp}cert.tmp"

Import-certificate-filepath "$env: tempcert.tmp"-certstorelocation ' Cert:currentuserroot '

Remove-item "$env: Tempcert.tmp"

$uri = Get-azurewinrmuri–service $serviceName –name $vmName

$cred = get-credential

Enter-pssession-connectionuri $uri-credential $cred

The VM name and Azure subscription name in the above script need to be changed to your own, and when the Credential dialog box appears, enter the username and password you specified when you created the Nano Server and click OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.