Database Reference
In-Depth Information
The CLI can be installed in one of two ways:
•
From the Node.js Package Manager (NPM), do the following:
a.
b.
Click on Install, and follow the instructions, accepting the default settings.
c. Open a command prompt, and execute the following command:
npm install -g azure-cli
From the Windows Installer, do the following:
•
a.
b.
Scroll down to the
Command line tools
section, and then click
Cross-platform
Command Line Interface
and follow the Web Platform Installer wizard instructions.
Once the installation is complete, you need to verify the installation. To do that, open Windows Azure Command
Prompt and execute the following command:
azure hdinsight -h
If the installation is successful, this command should display the help regarding all the HDInsight commands
that are available in CLI.
■
if you get an error that the command is not found, make sure you have the path
C:\Program Files (x86)\
Microsoft SDKs\Windows Azure\CLI\wbin\
to the
PATH
environment variable in the case of Windows installer. For
npm, make sure that the path
C:\Program Files (x86)\nodejs;C:\Users\[username]\AppData\Roaming\npm\
is
appended to the
PATH
variable.
Note
Once it is installed, execute the following command to download and save the publishsettings file:
azure account download
You should see output similar to the following once the file is downloaded:
info: Executing command account download
info: Launching browser to
http://go.microsoft.com/fwlink/?LinkId=254432
help: Save the downloaded file, then execute the command
help: account import <file>
info: account download command OK
The next step is to import the file in CLI using the following command:
azure account import<publishsettings file>
The file should be successfully imported, and the output will be similar to the following:
info: Executing command account import
info: Found subscription: <subscription_name>
info: Setting default subscription to: <subscription_name>