---
# System prepended metadata

title: Install Azure CLI on Windows

---

# Install Azure CLI on Windows

[Official Documentation](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli)
Download the 64 version and download or you can download with other way as well

## Purpose 
You can now run the Azure CLI with the az command from either Windows Command Prompt or PowerShell.

```
az --version
```
Confirmation of the version (may require to run as administrator)
![image](https://hackmd.io/_uploads/B1Ndt6nta.png)



## Login in with azure account

1. Login azure
```
az login --use-device-code
```

https://microsoft.com/devicelogin

Insert the device code
HJVVCKG57

![image](https://hackmd.io/_uploads/rkUIQ0hYa.png)

success
![image](https://hackmd.io/_uploads/SyFTmAnFT.png)

2. Powershell terminal command to deploy zip file

I made a mistake while creating the zip file 

Your zip file structure should be as below
```
.zip
    ├ app.py
    ├ requiments.txt
    ├ templates
    └ static
という構成のZIPにしてアップロードしてください
```

```
# Change these values to the ones used to create the App Service.
$resourceGroupName='aid-resource-group'
$appServiceName='aoi-web-service'
$zipPath = 'C:\Users\shree\Desktop\Ambl Project\azuresearchapp\AZURE_CHAT_APP_DEMO-main\AZURE_CHAT_APP_DEMO-main\Azure_App_Service_Session\web_app_aoi.zip'

az webapp deploy --name $appServiceName --resource-group $resourceGroupName --src-path $zipPath
```

3. Takes few seconds to complete
Success message
![image](https://hackmd.io/_uploads/ry8f5gaFa.png)

4. copy the link and load in the browser which is provided in your powershell as below 

"http://aoi-web-service.azurewebsites.net "

or Go to Overview of your aoi-web-service 
Click Default domain

In case your program is not running as expected please check the step 5

5. Setup Startup command 
Go to Configuration> General settings and in startup command add following code

[Official version ](https://learn.microsoft.com/en-us/azure/app-service/configure-language-python)
```
# If app.py
gunicorn --bind=0.0.0.0 --timeout 600 app:app
```




wiki_versio
```
python -m gunicorn main:app
```
![image](https://hackmd.io/_uploads/B1sfnl6FT.png)

Click save

Success

![image](https://hackmd.io/_uploads/Sk9eH-6tT.png)



I had to use anohther start up code
Success  