Skip to content

Commit 82c2337

Browse files
author
Stephen Tramer
committed
Fix typos and clean up
1 parent 223da8d commit 82c2337

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

docs-conceptual/azps-1.3.0/authenticate-azureps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $creds = Get-Credential
4343
Connect-AzAccount -Credential $creds
4444
```
4545

46-
## Sign in with a service principal
46+
## Sign in with a service principal <a name="sp-signin"/>
4747

4848
Service principals are non-interactive Azure accounts. Like other user accounts, their permissions are managed with Azure Active Directory. By granting a service principal only the permissions it needs, your automation scripts stay secure.
4949

docs-conceptual/azps-1.3.0/create-azure-service-principal-azureps.md

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Create a service principal with the [New-AzADServicePrincipal](/powershell/modul
2929

3030
> [!NOTE]
3131
>
32-
> If your account doesn't have permission to create a service principal, `New-AzADServicePrincpal` will return an error message containing
32+
> If your account doesn't have permission to create a service principal, `New-AzADServicePrincipal` will return an error message containing
3333
> "Insufficient privileges to complete the operation." Contact your Azure Active Directory admin to create a service principal.
3434
3535
There are two types of authentication available for service principals: Password-based authentication, and certificate-based authentication.
@@ -111,7 +111,7 @@ This example adds the **Reader** role and removes the **Contributor** one:
111111
112112
```azurepowershell-interactive
113113
New-AzRoleAssignment -ApplicationId <service principal application ID> -RoleDefinitionName "Reader"
114-
Delete-AzRoleAssignment -ApplicationId <service prinicpal application ID> -RoleDefinitionName "Contributor"
114+
Delete-AzRoleAssignment -ApplicationId <service principal application ID> -RoleDefinitionName "Contributor"
115115
```
116116
117117
> [!IMPORTANT]
@@ -148,33 +148,7 @@ store based on a certificate thumbprint.
148148
Connect-AzAccount -ServicePrincipal -TenantId $tenantId -CertificateThumbprint <thumbprint>
149149
```
150150

151-
In PowerShell 5, the certificate store can be managed and inspected with the [PKI](/powershell/module/pkiclient) module. For PowerShell 6, the process is more complicated. The following scripts show you how to import an existing certificate into the certificate store accessible by PowerShell.
152-
153-
#### Import a certificate in PowerShell 5
154-
155-
```azurepowershell-interactive
156-
# Import a PFX
157-
$credentials = Get-Credential -Message "Provide PFX private key password"
158-
Import-PfxCertificate -FilePath <path to certificate> -Password $credentials.Password -CertStoreLocation cert:\CurrentUser\My
159-
```
160-
161-
#### Import a certificate in PowerShell 6
162-
163-
```azurepowershell-interactive
164-
# Import a PFX
165-
$storeName = [System.Security.Cryptography.X509Certificates.StoreName]::My
166-
$storeLocation = [System.Security.Cryptography.X509Certificates.StoreLocation]::CurrentUser
167-
$store = [System.Security.Cryptography.X509Certificates.X509Store]::new($storeName, $storeLocation)
168-
$certPath = <path to certificate>
169-
$credentials = Get-Credential -Message "Provide PFX private key password"
170-
$flag = [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable
171-
$certificate = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new($certPath, $credentials.Password, $flag)
172-
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite)
173-
$store.Add($Certificate)
174-
$store.Close()
175-
```
176-
177-
To learn more about signing in with a service principal, see [Sign in with Azure PowerShell](authenticate-azureps.md).
151+
For instructions on importing a certificate into a credential store accessible by PowerShell, see [Sign in with Azure PowerShell](authenticate-azureps.md#sp-signin)
178152

179153
## Reset credentials
180154

0 commit comments

Comments
 (0)