Skip to main content

Azure PowerShell

Azure PowerShell is designed for managing and administering Azure resources from the command line. Use Azure PowerShell when you want to build automated tools that use the Azure Resource Manager model.

Install the Azure PowerShell module

You must run PowerShell 5.1 or higher on Windows.

PS D:\projects> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      17763  316
PS C:\Windows\system32> Install-Module az
Install-Module az
PS D:\projects> Connect-AzAccount

Account             SubscriptionName TenantId                             Environment
-------             ---------------- --------                             -----------
tuyen....@outlook.com Pay-As-You-Go    7a...309-f..f-4..d-be3b-fc5...4534c5 AzureCloud

Create a web app

PS D:\projects\dotnet-core-api> New-AzWebApp -ResourceGroupName DevTestFree -Name todolistapi -Location "Central US" -AppServicePlan DevTestFree

GitRemoteName               :
GitRemoteUri                :
GitRemoteUsername           :
GitRemotePassword           :
AzureStoragePath            :
State                       : Running
HostNames                   : {todolistapi.azurewebsites.net}
RepositorySiteName          : todolistapi
UsageState                  : Normal
Enabled                     : True
EnabledHostNames            : {todolistapi.azurewebsites.net, todolistapi.scm.azurewebsites.net}
AvailabilityState           : Normal
HostNameSslStates           : {todolistapi.azurewebsites.net, todolistapi.scm.azurewebsites.net}
ServerFarmId                : /subscriptions/ec9e2689-c134-405a-8a20-59f93e4dc95c/resourceGroups/
                              DevTestFree/providers/Microsoft.Web/serverfarms/DevTestFree
Reserved                    : False
IsXenon                     : False
HyperV                      :
LastModifiedTimeUtc         : 5/7/2019 2:59:35 PM
SiteConfig                  : Microsoft.Azure.Management.WebSites.Models.SiteConfig
TrafficManagerHostNames     :
ScmSiteAlsoStopped          : False
TargetSwapSlot              :
HostingEnvironmentProfile   :
ClientAffinityEnabled       : True
ClientCertEnabled           : False
ClientCertExclusionPaths    :
HostNamesDisabled           : False
OutboundIpAddresses         : 52.173.87.130,52.176.44.16,52.176.40.30,52.176.40.161,52.176.46.215
PossibleOutboundIpAddresses : 52.173.87.130,52.176.44.16,52.176.40.30,52.176.40.161,52.176.46.215
ContainerSize               : 0
DailyMemoryTimeQuota        : 0
SuspendedTill               :
MaxNumberOfWorkers          :
CloningInfo                 :
ResourceGroup               : DevTestFree
IsDefaultContainer          :
DefaultHostName             : todolistapi.azurewebsites.net
SlotSwapStatus              :
HttpsOnly                   : False
RedundancyMode              :
InProgressOperationId       :
GeoDistributions            :
Identity                    :
Id                          : /subscriptions/ec9e2689-c134-405a-8a20-59f93e4dc95c/resourceGroups/
                              DevTestFree/providers/Microsoft.Web/sites/todolistapi
Name                        : todolistapi
Kind                        : app
Location                    : Central US
Type                        : Microsoft.Web/sites
Tags                        :



PS D:\projects\dotnet-core-api>

Popular posts from this blog

Linux command: ssh-keygen - Generate SSH Keys

ssh-keygen — authentication key generation, management and conversion

RHEL: firewall-cmd

firewall-cmd - firewall d c om m an d line client

Powershell: Install-WindowsFeature AD-Domain-Services

Install-WindowsFeature AD-Domain-Services Powershell: Install-WindowsFeature AD-Domain-Services Check if AD-Domain-Services is installed Powershell: Check if AD-Domain-Services is installed