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

Windows 10 1903 Critical Error: Your Start menu isn't working

Windows 10 1903 Critical Error: Your Start menu isn't working. We'll try to fix it the next time you sign in.

Kubernetes or K8s

"The name Kubernetes originates from Greek, meaning helmsman or pilot. K8s as an abbreviation results from counting the eight letters between the 'K' and the 's'."

Powershell: Install IIS

Run Powershell as Administrator, then run the command below to install IIS. Install-WindowsFeature Web-WebServer Check after installing Get-WindowsFeature *Web*