Configuring Azure CLI 2.0 on Windows 10

Azure CLI is a cross platform scripting tool that runs on Linux, Mac and Windows.

There are two versions of the Azure Command-Line Interface (CLI) currently available:

  • Azure CLI 2.0: Next-generation CLI written in Python, for use with the Resource Manager deployment model.
  • Azure CLI 1.0: CLI written in Node.js, for use with both the classic and Resource Manager deployment models.

What we’ll cover here is how to install version 2.0 on a Windows 10 machine. To do this you basically need to follow the following steps in this article:

Install Azure CLI 2.0

image

You’ll need to firstly download Python for Windows which you will find here:

https://www.python.org/downloads/

Select the most current version (here 3.6.1).

image

Once you have downloaded the file, right mouse click on the downloaded file and select Run as administrator.

Accept the UAC that appears.

image

The install splash screen should now appear. Before you commence the install ensure the option to Add Python to PATH is selected at the bottom of the dialog as shown.

Select the Install now option to commence the installation.

image

You should now see the installation progressing.

image

Select Close when complete.

image

Open a command prompt and type:

python –-version

to which you should see the version number as shown above indicating that Python has install as expected.

You now need to install the Azure CLI which you do using the command:

pip install –-user azure-cli

image

image

You should then see a range of package being downloaded as shown above.

This process will take a few minutes to complete.

image

When the process is complete, you’ll be returned to the command prompt as shown.

image

The command that you run to launch the CLI environment is az.bat. That has been installed in:

C:\Users\\AppData\Roaming\Python\Python36\Scripts

which unfortunately has not been added to the PATH environment. So you’ll need to add this for convenience.

image

From the Windows 10 Start type environ and you should see the option Edit environment variables for your account at the top of the list as shown. Select this.

image

Select the Path line in the top box and then select the Edit button.

image

Select New and add the path to the az.bat file as shown above.

Select OK twice to save your changes and exit.

image

image

If you now go to the command prompt and type:

az

you should see the Azure CLI appear as shown above. You are now ready to use Azure CLI 2.0 on Windows to manage your Azure environment.

Accessing user mailboxes in Office 365

Following least privilege access, by default, even global administrators don’t have access to user mailboxes. This may prevent you from doing bulk administrative operations for your environment. To gain access to perform bulk administration tasks, such as using PowerShell scripts, you’ll need to assign the appropriate rights. This can be done in two places in the web interface.

image

If it is just mailbox access you require then the best place to assign these rights is in the Exchange admin center which you access from the Office 365 Admin center.

image

Select permissions on the left and then Discovery Management on the right. You then select the pen icon above the list of permissions to make changes.

image

At the bottom of the dialog that appears you can add new members to this role as well as view the included roles as shown above, one of which is Mailbox Search.

The description for the Discovery Management permission is:

Discovery Management

Members of this management role group can perform searches of mailboxes in the Exchange organization for data that meets specific criteria.

Note that it only provides permissions to mailboxes.

image

There is another way to provide rights to mailboxes BUT you’ll also be providing rights to files in SharePoint and OneDrive for Business. If you are following least privileged access best practices, which you should, you shouldn’t use this process if all you need is access to mailboxes.

Here you’ll need to navigate to the Security & Compliance center from the Admin center. You’ll then need to select Permissions on the left and the eDiscovery Manager on the right. You again select the pen icon to add the appropriate users to this role.

The description for this role is: 

eDiscovery Manager

Perform searches and place holds on mailboxes, SharePoint Online sites, and OneDrive for Business locations.

Note how this role provides permissions to mailboxes AND files as mentioned.

Once you have given a user permissions to mailboxes you may need to wait a little while (15 minutes typically) for them to fully flow through to all elements. Then you can start making the bulk changes you need.

Setting up Azure email billing alerts

Azure billing is very different from Office 365. It is consumption based rather than fixed cost per month cost. That is you pay for what you use. The more you use per month, the more you pay. Azure is also typically a ‘post-paid’ service, that is you pay for your usage at the end of the month.

Using Azure services is becoming easier and easier which translates into higher charges. There is also the case where people consume Azure services not exactly understanding what they consuming. This can result in a type of ‘bill-shock’ where the expected charges can be above the anticipated amount.

One of the way to avoid any potential Azure ‘bill-shock’ is to set up email billing alerts in Azure to warn you when your Azure consumption exceeds some threshold. Here’s how to do that.

image

Open the Azure management portal and navigate to the Subscriptions option. Then select the appropriate Subscription from the list of those available and from the menu at the top of the selected Subscription page select Manage as shown above.

image

You should then see a summary of your current usage for that subscription as shown above. Email alerting is currently in preview so select preview features from the menu across the top of the page.

image

You should now see the Billing Alert Service as shown above. Select the try it now button on the left to enable the service.

image

You’ll be prompted to confirm your selection by clicking the check mark in the lower right of the dialog box that appears.

image

The page will pause and think for a few moments.

image

and then you should see that the Billing Alert Service is active as shown above.

image

If you now return to the subscriptions option from the menu across the very top, you should now see a new option on the menu for your subscription called Alerts as highlighted above. Select the Alerts option to continue.

image

Select the add alert option. You’ll notice that you get a total of 5 alerts you can configure.

image

Enter a name for the alert as well as the when the alert will fire. You can also nominate up to two email addresses this alert will be sent to.

image

You can alert for either Monetary credits (i.e. amount remaining) or Billing total (i.e. amount spent). In this case I’m going to select Monetary credits because I want to know when my monthly available amount is becoming depleted.

Select Save when complete.

image

You should now see the alert you just created listed as shown above.

image

If you expand the alert you’ll see all the details and be able to make changes. You’ll also see the delete option (garbage can icon) on the right.

You can now add any additional alerts you desire.

Now if your subscription triggers an alert you’ll receive an email notification. Remember, if you have multiple Azure subscriptions in a tenant you’ll need to repeat this process for every subscription you wish to monitor.

Lowering your Azure VM costs

Microsoft have announced a new ‘Hybrid Use Benefit’ method to potentially reduce the cost of VMs in Azure by allowing you the right to use some of your on-premises licensing in Azure VM’s.

The above video give you more information as does this page:

https://azure.microsoft.com/en-us/pricing/hybrid-use-benefit/

As you can see, the saving can be up to 40%! That’s pretty significant if you qualify.

Another tool that Microsoft has just announced to help you migrate to Azure is the:

Free cloud migration assessment

This assessment can help you:

  • Identify all the servers across your datacenter environment
  • Analyse your workload configuration
  • Estimate the initial cost benefits of moving to Microsoft Azure
  • View and export the results into a customized report

However, if you are just getting started with Azure check out this on demand webinar:

Getting Started with Microsoft Azure

External access for Microsoft Teams slated for June

Microsoft Teams is significantly changing the way businesses think about collaboration as I have detailed previously:

The modern way of collaboration using Microsoft Teams

but we still need to keep in mind that it is all still relatively new.

image

One of the most requested enhancements, as you can see from the above post on Uservoice is to allow external access to Microsoft Teams.

image

Good news is the reply posted by Microsoft shown above. They have committed to a date for this feature addition and that date should be in June! Pretty quick eh?

It will be amazing to think of all the collaboration opportunities that will open up once Microsoft Teams is available to third parties. This is going to make the product bigger and more successful than it already is.

My advice? If you haven’t started looking at Teams you really should be.

Need to Know Podcast–Episode 148

Marc goes solo for this episode as he covers the recent Experts Live in Melbourne. He speaks with a bunch of guests all about the sessions that happened during the conference and their thoughts about the technology being discussed.

Take a listen and let us know what you think –feedback@needtoknow.cloud

You can listen to this episode directly at:

https://ciaops.podbean.com/e/episode-148-experts-live/

or via Soundcloud here:

 

Subscribe via iTunes at:

https://itunes.apple.com/au/podcast/ciaops-need-to-know-podcasts/id406891445?mt=2

The podcast is also available on Stitcher at:

http://www.stitcher.com/podcast/ciaops/need-to-know-podcast?refid=stpr

Don’t forget to give the show a rating as well as send us any feedback or suggestions you may have for the show.

Resources

@marckean

@directorcia

@daniel_apps

@onpremcloudguy

@orinthomas

@danielmar268

@pzerger

Experts Live

Conference wrap up from Marc

This episode brought to you buy:

https://cpem.io/tJ01Hzu2k.js

Getting an early look

image

With things changing so fast these days it is important to keep ahead of the curve, especially if your job is to manage IT for an organisation. Office 365 makes this process pretty simple.

If you want to get access to the latest desktop software firstly login to your Office 365 tenant as an administrator. Then navigate to the Admin center as shown above. In the top right of the dashboard you should see a section Office software.

image

Inside the Office software section you will find an option, Software download settings, which you should select.

image

This will now show you a number of software options as shown above.

image

If you scroll down a bit you should find the option about when to get the latest features. Here you can select Current or Deferred channel as shown above. To get the latest software select Every month (Current channel) and save the changes.

image

You’ll then need to head back to the Admin center and do a search for First Release which is in the Organization profile area as shown above. Ensure that you enable the appropriate users for First Release and save any changes. For more information on First Release see:

Set up the Standard or First Release options in Office 365

image

First Release users should now see, when they install the desktop software and look in File | Account as shown above, that they are now on the Office Insider program.

For more information see these links:

Be an Office Insider

How Office 365 commercial customers can get early access to new Office 2016 features

Overview of update channels for Office 365 ProPlus

Version and build numbers of update channel releases for Office 365 clients

Office 365 client update channel releases

CIAOPS Need to know Webinar–April 2017

laptop-eyes-technology-computer

Time for our April webinar! This month’s free webinar will feature the usual cloud updates and news along with open Q & A but also a look at Microsoft Staffhub that is now part of Office 365 and allows you to do basic rostering. I’ll show you the product and how it integrates into the Office 365 ecosystem.

You can register now for free at:

April Webinar Registration

The details are:

CIAOPS Need to Know Webinar – April 2017
Thursday 20th of April 2017
11am – 12am Sydney Time

All sessions are recorded and posted to the CIAOPS Academy.

There of course will also be open Q and A so make sure you bring your questions for me and I’ll do my best to answer them.

The CIAOPS Need to Know Webinars are free to attend but if you want to receive the recording of the session you need to sign up as a CIAOPS patron (for only USD$10 per month) which you can do here:

https://www.patreon.com/ciaops

or purchase them individually at:

http://www.ciaopsacademy.com/

Also feel free at any stage to email me directly via director@ciaops.com with your webinar topic suggestions.

I’d also appreciate you sharing information about this webinar with anyone you feel may benefit from the session.