diff --git a/samples/manage/azure-hybrid-benefit/README.md b/samples/manage/azure-hybrid-benefit/README.md index 323dc17e..90ff7e3b 100644 --- a/samples/manage/azure-hybrid-benefit/README.md +++ b/samples/manage/azure-hybrid-benefit/README.md @@ -3,7 +3,7 @@ services: Azure SQL platforms: Azure author: anosov1960 ms.author: sashan -ms.date: 10/26/2022 +ms.date: 01/07/2023 --- # Overview @@ -42,9 +42,10 @@ The following resources are in scope for the license utilization analysis: > - For IaaS workloads, such as SQL Server in Virtual Machines or SSIS integration runtimes, each vCPU is counted as one vCore. > - For PaaS workloads, each vCore of Business Critical service tier is counted as one Enterprise vCore and each vCore of General Purpose service tier is counted as one Standard vCore. > - In the DTU-based purchasing model, the SQL license cost is built into the individual SKU prices. These resources are not eligible for Azure Hybrid Benefit or HADR benefit, and therefore are not in scope of the tool. -> - You must be at least a *Reader* of each subscription you scan. -> - To report unregistered vCores, you must be a subscription *Contributor* or *Owner*, otherwise this column will show a zero value. Selecting this option will substantially increase the execution time, especially for the subscriptions with large numbers of virtual machines. -> - The values AHB ECs and PAYG ECs are reserved for the future use and should be ignored + +# Required permissions + +You must be at least a *Reader* of each subscription you scan. If you report unregistered vCores, you must have the `Microsoft.Compute/virtualMachines/runCommand/action` permission. The [Virtual Machine Contributor](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#virtual-machine-contributor) role and higher levels have this permission. If you don't have this permission, the tool will shows zero value for unregistered cores. # Launching the script @@ -59,8 +60,6 @@ The script accepts the following command line parameters: |-Cred|credential_object|Optional: value of type PSCredential to securely pass database user and password| |-FilePath|csv_file_name|Optional: filename where the data will be saved in a .csv format. Ignored if database parameters are specified| |-ShowUnregistered|\$True or \$False (default)|Optional: causes the script to report the total size of VMs with a self-hosted SQL server instance that is unregistered with the IaaS SQL extension| -|-ShowNC|\$True or \$False (default)|Optional: causes the script to report the AHB and PAYG consumption in normalized cores (NC). For more information about normalized cores, see [How licenses apply to Azure resources](https://learn.microsoft.com/azure/cost-management-billing/scope-level/overview-azure-hybrid-benefit-scope#how-licenses-apply-to-azure-resources).| - 1You can create a .csv file using the following command and then edit to remove the subscriptions you don't want to scan. ```PowerShell @@ -68,6 +67,9 @@ Get-AzSubscription | Export-Csv .\mysubscriptions.csv -NoTypeInformation ``` If both database parameters and *FilePath* are omitted, the script will write the results to a `.\sql-license-usage.csv` file. The file is created automatically. If the file already exists, the consecutive scans will append the results to it. If the database parameters are specified, the data will be saved in a *Usage-per-subscription* table. If the table doesn't exist, it will be created automatically. +>[!IMPORTANT] +> Selecting `-ShowUnregistered` option will substantially increase the execution time, especially for the subscriptions with a large number of virtual machines. + ## Example 1 The following command will scan all the subscriptions to which the user has access to and save the results in `.\sql-license-usage.csv`