From d17352781f22d9c1d9968ef29f385fc8269b4059 Mon Sep 17 00:00:00 2001 From: "Alexander (Sasha) Nosov" Date: Mon, 24 Jun 2024 16:21:09 -0700 Subject: [PATCH] Updated read.me --- .../activate-pcore-license/README.md | 47 ++----------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/README.md b/samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/README.md index edc77eeb..67334113 100644 --- a/samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/README.md +++ b/samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/README.md @@ -3,7 +3,7 @@ services: Azure SQL platforms: Azure author: anosov1960 ms.author: sashan -ms.date: 06/12/2024 +ms.date: 06/24/2024 --- # Overview @@ -21,47 +21,7 @@ Your RBAC role must include the following permissions: - Microsoft.Resources/subscriptions/resourceGroups/read - Microsoft.Support/supporttickets/write -# Launching the script - -The script accepts the following command line parameters: - -| **Parameter**                                         | **Value**                                                                       | **Description** | -|:--|:--|:--| -|-LicenseId| License resource URI | -|-UseInRunbook| \$True or \$False (default) | Optional: must be $True when executed as a Runbook| - - -## Example - -The following command activate the license - -```PowerShell -.\activate-pcore-license.ps1 -LicenseID -``` - -# Running the script using Cloud Shell - -To run the script in the Cloud Shell, use the following steps: - -1. Launch the [Cloud Shell](https://shell.azure.com/). For details, read [PowerShell in Cloud Shell](https://aka.ms/pscloudshell/docs). - -2. Upload the script to the shell using the following command: - - ```console - 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 - ``` - -3. Run the script with a set of parameters that reflect your desired configuration. - - ```console - .\activate-pcore-license.ps1 -licenseID - ``` - -> [!NOTE] -> - To paste the commands into the shell, use `Ctrl-Shift-V` on Windows or `Cmd-v` on MacOS. -> - The `curl` command will copy the script directly to the home folder associated with your Cloud Shell session. - -# Running the script as a Azure runbook +# Creating a Azure runbook You can scahedule to run the the command as a runbook. To set it up using Azure Portal, follow these steps. @@ -73,10 +33,9 @@ curl https://raw.githubusercontent.com/anosov1960/sql-server-samples/master/samp 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. +1. From the runbook blade, click on the *Link to schedule* button and select an existing schedule or create a new one withand spesify the designed launch time. 1. Click on *Parameters and run settings* and specify the following parameters: - LICENSEID. Put in teh resourec URI - - USEINRUNBOOKS. Select True to activate the logic that authenticates the runbook using the *Azure Run As Account*. 1. Click **OK** to link to the schedule and **OK** again to create the job. For more information about the runbooks, see the [Runbook tutorial](https://docs.microsoft.com/en-us/azure/automation/learn/automation-tutorial-runbook-textual-powershell)