The New-AzResource cmdlet creates a new resource. You can use it to create a resource of any type that is supported by Azure Resource Manager.
New-AzResource
    [-Name] 
    [-Location] 
    [-ResourceType] 
    [-ApiVersion] 
    [-ResourceGroupName] 
    [-Scope] 
    [-Force]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    []       Specifies the name of the resource to create.
String
Specifies the location for the resource. For example, East US, West US, or Southeast Asia.
String
Specifies the type of the resource to create. For example, Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
String
Specifies the API version to use for the resource type. If not specified, the latest stable API version is used.
String
Specifies the name of the resource group in which to create the resource. If not specified, the resource is created in the default resource group.
String
Specifies the scope at which to create the resource. This can be a subscription, resource group, or management group. For example, /subscriptions/00000000-0000-0000-0000-000000000000.
String
Suppresses confirmation messages. By default, the cmdlet prompts for confirmation if a global resource group is specified.
SwitchParameter
Runs the cmdlet as a background job. Use this parameter to run the cmdlet while the main Windows PowerShell window is still active. The cmdlet submits the command to the PowerShell job runspace and returns a job object.
SwitchParameter
Shows what would happen if the cmdlet runs. The cmdlet is not run.
SwitchParameter
Prompts you for confirmation before running the cmdlet. The cmdlet is not run.
SwitchParameter
New-AzResource -Name "mystorageaccount" -Location "East US" -ResourceType "Microsoft.Storage/storageAccounts" -ApiVersion "2021-09-01" -ResourceGroupName "myResourceGroup"This command creates a storage account named mystorageaccount in the East US region within the myResourceGroup resource group.
New-AzResource -Name "myVM" -Location "West US" -ResourceType "Microsoft.Compute/virtualMachines" -ApiVersion "2020-06-01" -ResourceGroupName "myVMResourceGroup"This command creates a virtual machine named myVM in the West US region within the myVMResourceGroup resource group.