How to set up SMT to manage servers on-premises, AWS, etc. from Azure for free

Let’s star with what SMT is. SMT (Server Management Tools) is the new way to manage servers within azure. SMT can manage servers on Azure, AWS, premises, etc; of course there are some minimum configurations that needs to be done but it is very straight forward.

The following requirements needs to meet before configuring SMT

  1. You need an Azure account (FREE)
  2. WMF 5.0 or above needs to be installed
  3. Only Supports Windows 2012 and above for the clients
  4. A server that will act as a Gateway on premises

Let’s start

  1. For the gateway on premises I am going to use Windows 2016 standard (server core). I believe at the moment nano server is not supported to be used as SMT gateway.
  2. Login to the azure portal1
  3. Open the market place and look for the Server management tools 23
  4. You can deploy this on a pre-created resource group with all the permissions needed. For this example we will create a new resource 4
  5. Now if you check you resources, you will see a Server management tools connection and Server management tools gateway4
    SMT Gateway – machine that act as gateway between Azure and on-premises
    SMT Connection – this is the name of the server to be managed
  6. We need to create a gateway on premises. Click on the SMT connection5
  7. Click on the orange banner and then on “Configured required. Click here to configure this Gateway”
    1
  8. Click generate a package link. I will leave updates automatic but for the lab this should be fine. You may wan to use manual updates on production. In my case I will download the package on my Windows 2016 server core machine.
  9.  The download is a zip file. When you open the .zip it will contain the gateway service msi and a profile json file that looks like this 4
  10. To install the gateway use the following in PowerShell
    GatewayService.msi /qn GATEWAYPROFILEJASON=C:\profile.json ACCEPTEULA=true ACCEPTPRIVACYPOLICY=true
    5
  11. After a successful installation two services should have been created Server Management Tools Gateway and SMT update
  12. Now that they gateway have been installed we need to go back to the Azure Portal. You will see a different message and you will see a different message after you refresh the space 6
    Admin credential needs to added. This credentials will be used to connect to the servers on premises
  13. You will have the choice to save the credentials or type them. For this scenario I will choose to save it1
  14. Now you will get an error that you cannot connect. The reason being is because the name of the connector need of the node on premises. So will be create a new connector2
  15. Lets create a new connector with the correct servername3
    In this case i used the existing resource Group “SMT” and the existing gateway “SMT02”
  16. After you create the connection and type the credentials you can start getting the data right away1
  17. Now the fun lets see what we can do.

There is a PowerShell blade available that will allow you to run commands remotely. The first i noticed is that autocomplete works !!!. I am going to run restart-computer to make sure it works

2

1

There is also a script editor on the portal.  A little tip If you get disconnected you have to connect again

4

As you can see you can write scripts on the portal and they will execute. If you want to save the script you can save on a blob storage or on a local file on the server

1.png

 

Event viewer is also available

2

 

There is an interesting tab called Windows updates and will not surprise if it has any integration with OMS

1

If you click on install updates and choose restart immediately you will get the following message1

1

The updated took like 10 minutes. At the moment I do not have WSUS installed on the my lab

1

 

2

 

CONCLUSION

There are a couple of challenges. If you want to do server lifecycle management there is no way yet to do that if you need to manage 100 + machines. However, you can do this using ARM templates to create the connections.

I can see support teams using this solution because it will have everything that they need and they will not need admin access to the servers. You will also be able to restrict servers based on resources group. identity lifecycle management becomes easier.

Another use will be that you need to manage servers around the globe, different cloud providers, data centers, domains this become the single pane glass to manage all.

You can find more information about SMT here

https://blogs.technet.microsoft.com/servermanagement/

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s