Skip to content

Commit 03d499e

Browse files
authored
[Connect-AzConnectedMachine] Fixes error with return value processing (#19542)
* Fixing error with return value processing * Update changelog
1 parent ccc52fa commit 03d499e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/ConnectedMachine/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* Added cmdlet Update-AzConnectedMachine
2525
* Added ResourceGroup to the display table
2626
* Fixed the issue of extension settings not being able to serialize correctly
27+
* Fixed issue with Connect-AzConnectedMachine throwing errors when onboarding multiple machines at once
2728

2829
## Version 0.3.0
2930
* Upgraded API version to 2021-05-20

src/ConnectedMachine/custom/Connect-AzConnectedMachine.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function Connect-AzConnectedMachine {
241241
# Handle show result by getting the name and getting the machine object
242242
$showResult | ForEach-Object {
243243
# Get name of machine registered
244-
$selectStrResult = $ShowResult | Select-String -Pattern "^Resource Name\s+: (?<resourceName>.*)\n"
244+
$selectStrResult = $_ | Select-String -Pattern "^Resource Name\s+: (?<resourceName>.*)\n"
245245
$Name = $selectStrResult.Matches.Groups |
246246
Where-Object Name -EQ resourceName |
247247
Select-Object -ExpandProperty Value

0 commit comments

Comments
 (0)