Skip to content

Commit de5129e

Browse files
author
Alexander (Sasha) Nosov
committed
renames the file ext to .md
1 parent bc8bede commit de5129e

2 files changed

Lines changed: 37 additions & 37 deletions

File tree

samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ You can scahedule to run the the command as a runbook. To set it up using Azure
2727

2828
1. Open a command shell on your device and run this command. It will copy the script to your local folder.
2929
```console
30-
curl https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/activate-pcore-license.md -o activate-pcore-license.ps1
30+
curl https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/activate-pcore-license.ps1 -o activate-pcore-license.ps1
3131
```
3232
1. [Create a new automation account](https://ms.portal.azure.com/#create/Microsoft.AutomationAccount) or open an existing one. In the Advanced section, make sure that *System assigned identity* is selecetd.
3333
1. In the **Process automation** group select **Runbooks**

samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/activate-pcore-license.md renamed to samples/manage/azure-arc-enabled-sql-server/activate-pcore-license/activate-pcore-license.ps1

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
.<#
2-
.DESCRIPTION
3-
This runbook activates a SQL Server license using the Managed Identity
4-
The runbook accepts the following parameters:
5-
6-
-LicenseID (The license resource URI)
7-
8-
.NOTES
9-
AUTHOR: Alexander (Sasha) Nosov
10-
LASTEDIT: June 24, 2024
11-
#>
12-
13-
param (
14-
[Parameter (Mandatory= $true)]
15-
[string] $LicenseId
16-
)
17-
18-
#
19-
# Suppress warnings
20-
#
21-
Update-AzConfig -DisplayBreakingChangeWarning $false
22-
23-
# Logging in to Azure..."
24-
try
25-
{
26-
Connect-AzAccount -Identity
27-
}
28-
catch {
29-
Write-Error -Message $_.Exception
30-
throw $_.Exception
31-
}
32-
33-
$currentLicense = Get-AzResource -ResourceId $LicenseId
34-
$currentLicense.properties.activationState = "Activated"
35-
$currentLicense | Set-AzResource -Force
36-
1+
.<#
2+
.DESCRIPTION
3+
This runbook activates a SQL Server license using the Managed Identity
4+
The runbook accepts the following parameters:
5+
6+
-LicenseID (The license resource URI)
7+
8+
.NOTES
9+
AUTHOR: Alexander (Sasha) Nosov
10+
LASTEDIT: June 24, 2024
11+
#>
12+
13+
param (
14+
[Parameter (Mandatory= $true)]
15+
[string] $LicenseId
16+
)
17+
18+
#
19+
# Suppress warnings
20+
#
21+
Update-AzConfig -DisplayBreakingChangeWarning $false
22+
23+
# Logging in to Azure..."
24+
try
25+
{
26+
Connect-AzAccount -Identity
27+
}
28+
catch {
29+
Write-Error -Message $_.Exception
30+
throw $_.Exception
31+
}
32+
33+
$currentLicense = Get-AzResource -ResourceId $LicenseId
34+
$currentLicense.properties.activationState = "Activated"
35+
$currentLicense | Set-AzResource -Force
36+

0 commit comments

Comments
 (0)