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

Ansible on Fedora Workstation 30

RedHat acquired Ansible in 2015 .

MSSQL: Fix error 'Consistency validation for SQL Server registry keys'

While installing Microsof SQL Server 2012, I ran into the following error. "The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys." How to fix Replace the D:\x64\FixSqlRegistryKey_x86.exe file with the original file from the ENU\SQLFULL_ENU.iso file downloading from Microsoft Download Center. This ISO file is 4.2GB. So you can click FixSqlRegistryKey_x86.exe to download this file only. After replacing that file, press Re-run to check. All rules are passed.

Install Microsoft .NET Core SDK

.NET Core Software Development Kit (SDK) is a set of libraries and tools that allow developers to create .NET Core applications and libraries.