Skip to content

Commit 586deff

Browse files
authored
Updated Example 3 of the Connect-AzAccount.md page to use the correct PowerShell variable. (#22376)
In line 137 the variable created is $SecurePassword but in line 140 $SecuredPassword was being used. Copying this example leads to the following error: New-Object : Exception calling ".ctor" with "2" argument(s): "Cannot process argument because the value of argument "password" is null. Change the value of argument "password" to a non-null value."
1 parent 5e5bc3f commit 586deff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Accounts/Accounts/help/Connect-AzAccount.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ authenticates as a service principal.
137137
$SecurePassword = ConvertTo-SecureString -String "Password123!" -AsPlainText -Force
138138
$TenantId = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy'
139139
$ApplicationId = 'zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzz'
140-
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $ApplicationId, $SecuredPassword
140+
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $ApplicationId, $SecurePassword
141141
Connect-AzAccount -ServicePrincipal -TenantId $TenantId -Credential $Credential
142142
```
143143

0 commit comments

Comments
 (0)