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

Powershell: Test-NetConnection

PS C:\Users\tuyen> get-help Test-NetConnection NAME     Test-NetConnection SYNTAX     Test-NetConnection [[-ComputerName] <string>] [-TraceRoute] [-Hops <int>] [-InformationLevel {Quiet |     Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] [-CommonTCPPort] {HTTP | RDP | SMB | WINRM}     [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -Port <int> [-InformationLevel {Quiet | Detailed}]     [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -DiagnoseRouting [-ConstrainSourceAddress <string>]     [-ConstrainInterface <uint32>] [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>] ALIASES     TNC REMARKS     Get-Help cannot find the Help files fo...

Learn MATLAB

MATLAB is an abbreviation for MAT rix LAB oratory. Here is list of free online courses to learn MATLAB.

Less secure app access in gmail or G Suite

From G Suite Update on December 16, 2019 Google turned off less secure app access to G Suite accounts .