diff --git a/src/Resources/Resources/help/Get-AzResourceProvider.md b/src/Resources/Resources/help/Get-AzResourceProvider.md index 7b393cc4f1e9..c3d716f118e6 100644 --- a/src/Resources/Resources/help/Get-AzResourceProvider.md +++ b/src/Resources/Resources/help/Get-AzResourceProvider.md @@ -30,6 +30,182 @@ The **Get-AzResourceProvider** cmdlet gets an Azure resource provider. ## EXAMPLES +### Example 1: Get all resource providers registered with the current subscription + +```powershell +PS C:\>Get-AzResourceProvider + +ProviderNamespace : Microsoft.AppConfiguration +RegistrationState : Registered +ResourceTypes : {configurationStores, configurationStores/eventGridFilters, checkNameAvailability, locations…} +Locations : {West Central US, Central US, West US, East US…} + +ProviderNamespace : Microsoft.KeyVault +RegistrationState : Registered +ResourceTypes : {vaults, vaults/secrets, vaults/accessPolicies, operations…} +Locations : {North Central US, East US, North Europe, West Europe…} + +ProviderNamespace : Microsoft.Network +RegistrationState : Registered +ResourceTypes : {virtualNetworks, publicIPAddresses, networkInterfaces, privateEndpoints…} +Locations : {West US, East US, North Europe, West Europe…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {availabilitySets, virtualMachines, virtualMachines/extensions, virtualMachineScaleSets…} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Security +RegistrationState : Registered +ResourceTypes : {operations, securityStatuses, tasks, regulatoryComplianceStandards…} +Locations : {Central US, East US, West Europe, West Central US…} + +ProviderNamespace : Microsoft.ResourceHealth +RegistrationState : Registered +ResourceTypes : {availabilityStatuses, childAvailabilityStatuses, childResources, events…} +Locations : {Australia Southeast} + +ProviderNamespace : Microsoft.PolicyInsights +RegistrationState : Registered +ResourceTypes : {policyEvents, policyStates, operations, asyncOperationResults…} +Locations : {} + +ProviderNamespace : Microsoft.Storage +RegistrationState : Registered +ResourceTypes : {storageAccounts, operations, locations/asyncoperations, storageAccounts/listAccountSas…} +Locations : {East US, East US 2, West US, West Europe…} + +ProviderNamespace : Microsoft.Web +RegistrationState : Registered +ResourceTypes : {publishingUsers, ishostnameavailable, validate, isusernameavailable…} +Locations : {Central US, North Europe, West Europe, Southeast Asia…} + +ProviderNamespace : Sendgrid.Email +RegistrationState : Registered +ResourceTypes : {accounts, operations} +Locations : {Australia East, Australia Southeast, Brazil South, Canada Central…} + +ProviderNamespace : Microsoft.Authorization +RegistrationState : Registered +ResourceTypes : {roleAssignments, roleDefinitions, classicAdministrators, permissions…} +Locations : {} +... +``` + +This command gets all the resource providers from the subscription. + +### Example 2: Get all resource provider details from the given ProviderNamespace + +```powershell +PS C:\>Get-AzResourceProvider -ProviderNamespace Microsoft.Compute +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {availabilitySets} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachines} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachines/extensions} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachineScaleSets} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachineScaleSets/extensions} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachineScaleSets/virtualMachines} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachineScaleSets/networkInterfaces} +Locations : {East US, East US 2, West US, Central US…} +... +``` + +This command Gets all the resource providers under "Microsoft.Compute". + +### Example 3: Get all resource provider details from the given ProviderNamespace array + +```powershell +PS C:\>Get-AzResourceProvider -ProviderNamespace Microsoft.Compute,Microsoft.Network +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {availabilitySets} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachines} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachines/extensions} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachineScaleSets} +Locations : {East US, East US 2, West US, Central US…} + +ProviderNamespace : Microsoft.Compute +RegistrationState : Registered +ResourceTypes : {virtualMachineScaleSets/extensions} +Locations : {East US, East US 2, West US, Central US…} +... + +ProviderNamespace : Microsoft.Network +RegistrationState : Registered +ResourceTypes : {virtualNetworks} +Locations : {West US, East US, North Europe, West Europe…} + +ProviderNamespace : Microsoft.Network +RegistrationState : Registered +ResourceTypes : {publicIPAddresses} +Locations : {West US, East US, North Europe, West Europe…} + +ProviderNamespace : Microsoft.Network +RegistrationState : Registered +ResourceTypes : {networkInterfaces} +Locations : {West US, East US, North Europe, West Europe…} + +ProviderNamespace : Microsoft.Network +RegistrationState : Registered +ResourceTypes : {privateEndpoints} +Locations : {West US, East US, North Europe, West Europe…} + +ProviderNamespace : Microsoft.Network +RegistrationState : Registered +ResourceTypes : {privateEndpointRedirectMaps} +Locations : {West US, East US, North Europe, West Europe…} + +ProviderNamespace : Microsoft.Network +RegistrationState : Registered +ResourceTypes : {loadBalancers} +Locations : {West US, East US, North Europe, West Europe…} + +ProviderNamespace : Microsoft.Network +RegistrationState : Registered +ResourceTypes : {networkSecurityGroups} +Locations : {West US, East US, North Europe, West Europe…} +... +``` + +This command Gets all the resource providers under "Microsoft.Compute" and "Microsoft.Network". + ## PARAMETERS ### -ApiVersion diff --git a/src/Resources/Resources/help/Invoke-AzResourceAction.md b/src/Resources/Resources/help/Invoke-AzResourceAction.md index 869d77cb37c2..f872c10e757f 100644 --- a/src/Resources/Resources/help/Invoke-AzResourceAction.md +++ b/src/Resources/Resources/help/Invoke-AzResourceAction.md @@ -42,6 +42,45 @@ To get a list of supported actions, use the Azure Resource Explorer tool. ## EXAMPLES +### Example 1: Invoke starting a VM with ResourceId + +```powershell +PS C:\>Invoke-AzResourceAction -ResourceId /subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/testVM -Action start + +Confirm +Are you sure you want to invoke the 'start' action on the following resource: /subscriptions/{subId}/resourceGroups/testGroup/providers/Microsoft.Compute/virtualMachines/testVM +[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y +``` + +This command starts the Virtual Machine with {ResourceId}. + +### Example 2: Invoke poweroffing a VM with ResourceName + +```powershell +PS C:\>Invoke-AzResourceAction -ResourceGroupName testGroup -ResourceName testVM -ResourceType Microsoft.Compute/virtualMachines/ -Action Poweroff -Force +``` + +This command stops the Virtual Machine with {ResourceId}. +The command specifies the *Force* parameter, therefore, it does not prompt you for confirmation. + +### Example 3: Invoke registering a resource provider with ResourceId + +```powershell +PS C:\>Invoke-AzResourceAction -ResourceId /subscriptions/{subId}/providers/Microsoft.Network -action register -Force + +id : /subscriptions/{subId}/providers/Microsoft.Network +namespace : Microsoft.Network +authorizations : {…} +resourceTypes : {@{resourceType=virtualNetworks; locations=System.Object[]; apiVersions=System.Object[]}, + @{resourceType=publicIPAddresses; locations=System.Object[]; apiVersions=System.Object[]}, + @{resourceType=networkInterfaces; locations=System.Object[]; apiVersions=System.Object[]}, + @{resourceType=privateEndpoints; locations=System.Object[]; apiVersions=System.Object[]}…} +registrationState : Registered +``` + +This command registers a resource provider "Microsoft.Network". +The command specifies the *Force* parameter, therefore, it does not prompt you for confirmation. + ## PARAMETERS ### -Action diff --git a/src/Resources/Resources/help/Remove-AzResourceGroupDeployment.md b/src/Resources/Resources/help/Remove-AzResourceGroupDeployment.md index 1fed0eb2fac8..9f0af6390acb 100644 --- a/src/Resources/Resources/help/Remove-AzResourceGroupDeployment.md +++ b/src/Resources/Resources/help/Remove-AzResourceGroupDeployment.md @@ -26,10 +26,33 @@ Remove-AzResourceGroupDeployment -Id [-ApiVersion ] [-Pre] ``` ## DESCRIPTION + The **Remove-AzResourceGroupDeployment** cmdlet removes an Azure resource group deployment and any associated operations. ## EXAMPLES +### Example 1: Removes a resource group deployment with ResourceId + +```powershell +PS C:\>Remove-AzResourceGroupDeployment -ResourceId /subscriptions/{subId}/resourceGroups/testGroup/providers/Microsoft.Resources/deployments/testDeployment1 + +True +``` + +This command removes a resource group deployment with the fully qualified resource Id of the deployment. +Successful removal returns true. + +### Example 2: Removes a resource group deployment with ResourceGroupName and ResourceName + +```powershell +PS C:\>Remove-AzResourceGroupDeployment -ResourceGroupName testGroup -Name testDeployment1 + +True +``` + +This command removes a resource group deployment with the provided ResourceGroupName and ResourceName. +Successful removal returns true. + ## PARAMETERS ### -ApiVersion diff --git a/src/Resources/Resources/help/Test-AzResourceGroupDeployment.md b/src/Resources/Resources/help/Test-AzResourceGroupDeployment.md index 4a5fe9ae8785..ddbb502547c3 100644 --- a/src/Resources/Resources/help/Test-AzResourceGroupDeployment.md +++ b/src/Resources/Resources/help/Test-AzResourceGroupDeployment.md @@ -112,7 +112,8 @@ The **Test-AzResourceGroupDeployment** cmdlet determines whether an Azure resour ## EXAMPLES ### Example 1: Test deployment with a custom template object and parameter file -``` + +```powershell PS C:\> $TemplateFileText = [System.IO.File]::ReadAllText("D:\Azure\Templates\EngineeringSite.json") PS C:\> $TemplateObject = ConvertFrom-Json $TemplateFileText -AsHashtable PS C:\> Test-AzResourceGroupDeployment -ResourceGroupName "ContosoEngineering" -TemplateObject $TemplateObject -TemplateParameterFile "D:\Azure\Templates\EngSiteParams.json" @@ -120,6 +121,14 @@ PS C:\> Test-AzResourceGroupDeployment -ResourceGroupName "ContosoEngineering" - This command tests a deployment in the given resource group using the an in-memory hashtable created from the given template file and a parameter file. +### Example 2: Test deployment via template file and parameter object + +```powershell +PS C:\> New-AzResourceGroupDeployment -Name testDeployment1 -ResourceGroupName testRG01 -TemplateFile "D:\Azure\Templates\sampleDeploymentTemplate.json" -TemplateParameterFile "D:\Azure\Templates\sampleDeploymentTemplateParams.json" +``` + +This command tests a deployment in the given resource group and resource using the provided template file and a parameter file. + ## PARAMETERS ### -ApiVersion diff --git a/src/Resources/Resources/help/Unregister-AzResourceProvider.md b/src/Resources/Resources/help/Unregister-AzResourceProvider.md index 4557beaa2830..f7b50369c557 100644 --- a/src/Resources/Resources/help/Unregister-AzResourceProvider.md +++ b/src/Resources/Resources/help/Unregister-AzResourceProvider.md @@ -23,6 +23,14 @@ The **Unregister-AzResourceProvider** cmdlet unregisters an Azure resource provi ## EXAMPLES +### Example 1: Unregister resource provider with ProviderNamespace + +```powershell +PS C:\>Unregister-AzResourceProvider -ProviderNamespace "Microsoft.support" +``` + +This command unregisters the resource provider "Microsoft.support". + ## PARAMETERS ### -ApiVersion