mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Fix parameters
This commit is contained in:
@@ -70,11 +70,7 @@ You can scahedule to run the the command as a runbook. To set it up using Azure
|
||||
curl https://raw.githubusercontent.com/anosov1960/sql-server-samples/master/samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/activate-pcore-license.md -o activate-pcore-license.ps1
|
||||
```
|
||||
2. [Create a new automation account](https://ms.portal.azure.com/#create/Microsoft.AutomationAccount) or open an existing one.
|
||||
1. Select *Run as accounts* in the **Account Settings** group, open the automatically created *Azure Run As Account* and note or copy the Display Name property. You must add this user to all the target subscriptions with at least a *Reader* access role. To collect the Unregistered vCores, the user must be at least a *Contributor*. See [Role assignment portal](https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal) for the instructions about role assignments.
|
||||
1. Select *Credentials* in the **Shared resources** group and create a credential object with the database username and password. The script will use these to connect to the specified database to save the license utilization data.
|
||||
1. Select *Modules* in the **Shared resources** group and make sure your automation account have the following PowerShell modules installed. If not, add them from the Gallery.
|
||||
- Az.Accounts
|
||||
- Az.Resources
|
||||
1. Select *Run as accounts* in the **Account Settings** group, open the automatically created *Azure Run As Account* and note or copy the Display Name property.
|
||||
1. Select *Runbooks* in the **Process automation** group and click on *Import a runbook*, select the file you downloaded in Step 1 and click **Create**.
|
||||
1. When import is completed, click the *Publish* button.
|
||||
1. From the runbook blade, click on the *Link to schedule* button and select an existing schedule or create a new one with the desired frequency of runs and the expiration time.
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
param (
|
||||
[Parameter (Mandatory= $true)]
|
||||
[string] $LicenseId,
|
||||
[Parameter (Mandatory= $false)]
|
||||
[string] $UseInRunbook = $false
|
||||
[Parameter (Mandatory= $true)]
|
||||
[string] $UseInRunbook
|
||||
)
|
||||
|
||||
function CheckModule ($m) {
|
||||
|
||||
Reference in New Issue
Block a user