File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Accounts/Accounts/help Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 151
151
152
152
### Example 3: Connect to Azure using a service principal account
153
153
154
- The first command stores the service principal credentials in the ` $Credential ` variable. The second
155
- command connects the specified Azure tenant using the service principal credentials stored in the
154
+ This command stores the service principal credentials in the ` $Credential ` variable. Then, it
155
+ connects to the specified Azure tenant using the service principal credentials stored in the
156
156
` $Credential ` variable. The ** ServicePrincipal** switch parameter indicates that the account
157
157
authenticates as a service principal.
158
158
159
159
``` powershell
160
- $SecurePassword = ConvertTo-SecureString -String "Password123!" -AsPlainText -Force
160
+ $SecurePassword = Read-Host -Prompt 'Enter a Password' -AsSecureString
161
161
$TenantId = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy'
162
162
$ApplicationId = 'zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzz'
163
163
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $ApplicationId, $SecurePassword
You can’t perform that action at this time.
0 commit comments