File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/Accounts/Accounts/help Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,9 @@ command connects the specified Azure tenant using the service principal credenti
134
134
authenticates as a service principal.
135
135
136
136
``` powershell
137
+ $SecurePassword = ConvertTo-SecureString -String "Password123!" -AsPlainText -Force
138
+ $TenantId = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy'
139
+ $ApplicationId = 'zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzz'
137
140
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $ApplicationId, $SecuredPassword
138
141
Connect-AzAccount -ServicePrincipal -TenantId $TenantId -Credential $Credential
139
142
```
@@ -239,7 +242,7 @@ This example connects to an Azure account using certificate-based service princi
239
242
The certificate file, which is specified by ` CertficatePath ` , should contains both certificate and private key as the input.
240
243
241
244
``` powershell
242
- $securePassword = $plainPassword | ConvertTo-SecureString -AsPlainText -Force
245
+ $SecurePassword = ConvertTo-SecureString -String "Password123!" -AsPlainText -Force
243
246
$TenantId = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy'
244
247
$ApplicationId = 'zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzz'
245
248
Connect-AzAccount -ServicePrincipal -ApplicationId $ApplicationId -TenantId $TenantId -CertificatePath './certificatefortest.pfx' -CertificatePassword $securePassword
You can’t perform that action at this time.
0 commit comments