Skip to content

Commit 703c146

Browse files
authored
Merge branch 'main' into Daily/Release_20251009115438
2 parents 582c813 + e9a75c4 commit 703c146

File tree

10 files changed

+6241
-16
lines changed

10 files changed

+6241
-16
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Monthly issue metrics
2+
on:
3+
workflow_dispatch:
4+
# schedule:
5+
# - cron: "3 2 1 * *"
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
name: issue metrics
13+
runs-on: ubuntu-latest
14+
permissions:
15+
issues: write
16+
pull-requests: read
17+
steps:
18+
- name: Get dates for last month
19+
shell: bash
20+
run: |
21+
# Calculate the first day of the previous month
22+
first_day=$(date -d "last month" +%Y-%m-01)
23+
24+
# Calculate the last day of the previous month
25+
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
26+
27+
#Set an environment variable with the date range
28+
echo "$first_day..$last_day"
29+
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
30+
31+
- name: Run issue-metrics tool
32+
uses: github/issue-metrics@v3
33+
env:
34+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
SEARCH_QUERY: 'repo:Azure/azure-powershell is:pr created:${{ env.last_month }}'
36+
DRAFT_PR_TRACKING: 'True'
37+
38+
- name: Create issue
39+
uses: peter-evans/create-issue-from-file@v5
40+
with:
41+
title: Monthly issue metrics report
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
content-filepath: ./issue_metrics.md

src/Compute/Compute.Test/ScenarioTests/DedicatedHostTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,12 @@ public void TestDedicatedHostUpdateAndSize()
5151
{
5252
TestRunner.RunTestScript("Test-DedicatedHostUpdateAndSize");
5353
}
54+
55+
[Fact]
56+
[Trait(Category.AcceptanceType, Category.CheckIn)]
57+
public void TestDedicatedHostRedeploy()
58+
{
59+
TestRunner.RunTestScript("Test-DedicatedHostRedeploy");
60+
}
5461
}
5562
}

src/Compute/Compute.Test/ScenarioTests/DedicatedHostTests.ps1

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,4 +333,40 @@ function Test-DedicatedHostUpdateAndSize
333333
# Cleanup
334334
Clean-ResourceGroup $rgname
335335
}
336+
}
337+
338+
<#
339+
.SYNOPSIS
340+
Test Update-AzHost with Redeploy parameter.
341+
#>
342+
function Test-DedicatedHostRedeploy
343+
{
344+
# Setup
345+
$rgname = Get-ComputeTestResourceName
346+
347+
try
348+
{
349+
# Common
350+
[string]$loc = Get-Location "Microsoft.Resources" "resourceGroups" "East US 2 EUAP";
351+
$loc = $loc.Replace(' ', '');
352+
353+
New-AzResourceGroup -Name $rgname -Location $loc -Force;
354+
355+
$hostGroupName = $rgname + 'hostgroup';
356+
New-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName -Location $loc -PlatformFaultDomain 1 -Zone "2" -Tag @{key1 = "val1"};
357+
358+
$hostName = $rgname + 'host';
359+
New-AzHost -ResourceGroupName $rgname -HostGroupName $hostGroupName -Name $hostName -Location $loc -Sku "DSv3-Type3" -Tag @{key1 = "val2"};
360+
361+
$dedicatedHost = Get-AzHost -ResourceGroupName $rgname -HostGroupName $hostGroupName -Name $hostName;
362+
Assert-NotNull $dedicatedHost;
363+
364+
# Test Update-AzHost with Redeploy parameter
365+
$updateHost = Update-AzHost -ResourceGroupName $rgname -HostGroupName $hostGroupName -Name $hostName -Redeploy;
366+
}
367+
finally
368+
{
369+
# Cleanup
370+
Clean-ResourceGroup $rgname
371+
}
336372
}

src/Compute/Compute.Test/SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.DedicatedHostTests/TestDedicatedHostRedeploy.json

Lines changed: 6057 additions & 0 deletions
Large diffs are not rendered by default.

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
-->
2222
## Upcoming Release
23+
* Added `-Redeploy` switch parameter for `Update-AzHost` cmdlet to enable dedicated host redeployment.
2324

2425
## Version 10.4.0
2526
* Added `-InstantAccessDurationMinutes` parameter to New-AzSnapshotConfig.

src/Compute/Compute/Generated/DedicatedHost/DedicatedHostUpdateMethod.cs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,19 @@ public override void ExecuteCmdlet()
7878
parameters.Sku = new Sku(this.Sku, null, null);
7979
}
8080

81+
if (this.Redeploy.IsPresent)
82+
{
83+
var redeployResult = DedicatedHostsClient.Redeploy(resourceGroupName, hostGroupName, Name);
84+
WriteObject(redeployResult);
85+
}
86+
else
87+
{
88+
var result = DedicatedHostsClient.Update(resourceGroupName, hostGroupName, Name, parameters);
8189

82-
var result = DedicatedHostsClient.Update(resourceGroupName, hostGroupName, Name, parameters);
83-
var psObject = new PSHost();
84-
ComputeAutomationAutoMapperProfile.Mapper.Map<DedicatedHost, PSHost>(result, psObject);
85-
WriteObject(psObject);
90+
var psObject = new PSHost();
91+
ComputeAutomationAutoMapperProfile.Mapper.Map<DedicatedHost, PSHost>(result, psObject);
92+
WriteObject(psObject);
93+
}
8694
}
8795
});
8896
}
@@ -123,6 +131,11 @@ public override void ExecuteCmdlet()
123131
Mandatory = false)]
124132
public DedicatedHostLicenseTypes LicenseType { get; set; }
125133

134+
[Parameter(
135+
Mandatory = false,
136+
HelpMessage = "Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.")]
137+
public SwitchParameter Redeploy { get; set; }
138+
126139
[Parameter(
127140
ParameterSetName = "ResourceIdParameter",
128141
Position = 0,
@@ -131,4 +144,4 @@ public override void ExecuteCmdlet()
131144
public string ResourceId { get; set; }
132145

133146
}
134-
}
147+
}

src/Compute/Compute/Generated/Models/PSHost.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,5 @@ public string ResourceGroupName
5454
public string Type { get; set; }
5555
public string Location { get; set; }
5656
public IDictionary<string, string> Tags { get; set; }
57-
5857
}
59-
}
58+
}

src/Compute/Compute/help/Update-AzHost.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ Updates the Dedicated Host.
1515
### DefaultParameter (Default)
1616
```
1717
Update-AzHost [-ResourceGroupName] <String> [-HostGroupName] <String> [-Name] <String> [-Sku <String>]
18-
[-AutoReplaceOnFailure <Boolean>] [-LicenseType <DedicatedHostLicenseTypes>]
19-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
18+
[-AutoReplaceOnFailure <Boolean>] [-LicenseType <DedicatedHostLicenseTypes>] [-Redeploy]
19+
[-DefaultProfile <IAzureContextContainer>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
2020
[<CommonParameters>]
2121
```
2222

2323
### ResourceIdParameter
2424
```
2525
Update-AzHost [-Sku <String>] [-AutoReplaceOnFailure <Boolean>] [-LicenseType <DedicatedHostLicenseTypes>]
26-
[-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]
27-
[-WhatIf] [-Confirm] [<CommonParameters>]
26+
[-Redeploy] [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]
27+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2828
```
2929

3030
## DESCRIPTION
@@ -132,6 +132,36 @@ Accept pipeline input: True (ByPropertyName)
132132
Accept wildcard characters: False
133133
```
134134
135+
### -ProgressAction
136+
Determines how PowerShell responds to progress updates generated by the cmdlet. You can use this parameter to control whether progress information is displayed, silently ignored, or handled in another way.
137+
138+
```yaml
139+
Type: System.Management.Automation.ActionPreference
140+
Parameter Sets: (All)
141+
Aliases: proga
142+
143+
Required: False
144+
Position: Named
145+
Default value: None
146+
Accept pipeline input: False
147+
Accept wildcard characters: False
148+
```
149+
150+
### -Redeploy
151+
Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.
152+
153+
```yaml
154+
Type: System.Management.Automation.SwitchParameter
155+
Parameter Sets: (All)
156+
Aliases:
157+
158+
Required: False
159+
Position: Named
160+
Default value: None
161+
Accept pipeline input: False
162+
Accept wildcard characters: False
163+
```
164+
135165
### -ResourceGroupName
136166
The name of the resource group.
137167

src/Sql/Sql/help/New-AzSqlDatabaseExport.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The get export database status request may be sent to retrieve status informatio
2828
This cmdlet is also supported by the SQL Server Stretch Database service on Azure.
2929

3030
> [!IMPORTANT]
31-
> In order to make use of this cmdlet the firewall on the Azure SQL Server will need to be configured to "Allow Azure services and resources to access this server". If this is not configured then GatewayTimeout errors will be experienced.
31+
> In order to make use of this cmdlet the firewall on the Azure SQL Server will need to be configured to "Allow Azure services and resources to access this server". If this is not configured then GatewayTimeout errors will be experienced. This is not required if a Private Link connection is established via the UseNetworkIsolation parameter.
3232
3333
## EXAMPLES
3434

@@ -55,11 +55,39 @@ ErrorMessage :
5555

5656
This command creates an export request for the specified database.
5757

58+
### Example 2: Create an export request for a database using managed identity for authentication over private link
59+
60+
```powershell
61+
$sqlServerName = "Server01"
62+
$storageAccountName = "storageaccount1"
63+
$subscriptionId = "00000000-0000-0000-0000-000000000000"
64+
$resourceGroup = "RG01"
65+
$managedIdentityResourceId = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-managed-identity"
66+
$pw = ConvertTo-SecureString "******" -AsPlainText -Force
67+
New-AzSqlDatabaseExport `
68+
-ResourceGroupName $resourceGroup `
69+
-ServerName $sqlServerName `
70+
-DatabaseName "Database01" `
71+
-StorageKeyType ManagedIdentity `
72+
-StorageKey $managedIdentityResourceId `
73+
-StorageUri "https://storageaccount1.blob.core.windows.net/container1/my-file-name.bacpac" `
74+
-AuthenticationType ManagedIdentity `
75+
-AdministratorLogin $managedIdentityResourceId `
76+
-AdministratorLoginPassword $pw `
77+
-UseNetworkIsolation $true `
78+
-SqlServerResourceIdForPrivateLink "/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.Sql/servers/$sqlServerName" `
79+
-StorageAccountResourceIdForPrivateLink "/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.Storage/storageAccounts/$storageAccountName"
80+
```
81+
82+
This command creates an export request for the specified database using managed identity for authentication with connectivity over Private Link.
83+
5884
## PARAMETERS
5985

6086
### -AdministratorLogin
6187
Specifies the name of the SQL administrator.
6288

89+
If `-AuthenticationType ManagedIdentity` is provided, this should be the full resource ID of a user-assigned managed identity that is a [Microsoft Entra administrator](https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-configure?view=azuresql&tabs=azure-portal#set-microsoft-entra-admin) of the server.
90+
6391
```yaml
6492
Type: System.String
6593
Parameter Sets: (All)
@@ -75,6 +103,7 @@ Accept wildcard characters: False
75103
### -AdministratorLoginPassword
76104
Specifies the password of the SQL administrator.
77105
106+
This is mandatory. When using `-AuthenticationType ManagedIdentity`, a placeholder value (for example, any non-empty SecureString value) must be provided.
78107
```yaml
79108
Type: System.Security.SecureString
80109
Parameter Sets: (All)
@@ -98,6 +127,9 @@ Set the *AdministratorLogin* and *AdministratorLoginPassword* to the SQL adminis
98127
Microsoft Entra authentication.
99128
Set *AdministratorLogin* and *AdministratorLoginPassword* to the Microsoft Entra administrator username and password.
100129
This parameter is only available on SQL Database V12 servers.
130+
- ManagedIdentity.
131+
Managed identity authentication.
132+
Use a user-assigned managed identity to authenticate with the SQL server. The managed identity must be a [Microsoft Entra administrator](https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-configure?view=azuresql&tabs=azure-portal#set-microsoft-entra-admin) for the server.
101133

102134
```yaml
103135
Type: Microsoft.Azure.Commands.Sql.ImportExport.Model.AuthenticationType
@@ -205,6 +237,8 @@ Accept wildcard characters: False
205237
### -StorageKey
206238
Specifies the access key for the storage account.
207239

240+
When `-StorageKeyType ManagedIdentity` is provided, this should be the full resource ID of a user-assigned managed identity which has write access on the storage account for the StorageUri provided (for example via a [Storage Blob Data Contributor](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/storage#storage-blob-data-contributor) role assignment).
241+
208242
```yaml
209243
Type: System.String
210244
Parameter Sets: (All)
@@ -224,6 +258,8 @@ The acceptable values for this parameter are:
224258
This value uses a storage account key.
225259
- SharedAccessKey.
226260
This value uses a Shared Access Signature (SAS) key.
261+
- ManagedIdentity.
262+
Use a user-assigned managed identity for authentication with the storage account.
227263

228264
```yaml
229265
Type: Microsoft.Azure.Commands.Sql.ImportExport.Model.StorageKeyType
@@ -239,8 +275,7 @@ Accept wildcard characters: False
239275
```
240276

241277
### -StorageUri
242-
Specifies the blob link, as a URL, to the .bacpac file.
243-
278+
Specifies the blob link, as a URL, to the .bacpac file. For example: `-StorageUri "https://your-storage-account.blob.core.windows.net/your-container/your-file-name.bacpac"`
244279
```yaml
245280
Type: System.Uri
246281
Parameter Sets: (All)

src/StackHCI/StackHCI.Autorest/custom/stackhci.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,9 @@ Function Write-NodeEventLog{
461461
{
462462
Write-VerboseLog ("Connecting from management node")
463463

464-
if (Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName)
464+
$computerNameHasDNSSuffix = Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName
465+
466+
if ($computerNameHasDNSSuffix -eq $true)
465467
{
466468
$ComputerNameWithDNSSuffix = $ComputerName
467469
}
@@ -5608,7 +5610,9 @@ function Get-SetupLoggingDetails
56085610

56095611
if($isManagementNode)
56105612
{
5611-
if (Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName)
5613+
$computerNameHasDNSSuffix = Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName
5614+
5615+
if ($computerNameHasDNSSuffix -eq $true)
56125616
{
56135617
$ComputerNameWithDNSSuffix = $ComputerName
56145618
}

0 commit comments

Comments
 (0)