Skip to content

Commit d35632c

Browse files
authored
Merge pull request Azure#907 from miguel-s-ferreira/patch-1
Update Remove-AzureADServicePrincipalKeyCredential.md
2 parents 5232c61 + 30c3c1d commit d35632c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

azureadps-2.0/AzureAD/Remove-AzureADServicePrincipalKeyCredential.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ The Remove-AzureADServicePrincipalKeyCredential cmdlet removes a key credential
2424

2525
### Example 1
2626
```powershell
27-
PS C:\> {{ Add example code here }}
27+
PS C:\> $SPObjectID = (Get-AzureADServicePrincipal -SearchString 'Azure Multi-Factor Auth Client').ObjectID
28+
PS C:\> Get-AzureADServicePrincipalKeyCredential -ObjectId $SPObjectID
29+
PS C:\> Remove-AzureADServicePrincipalKeyCredential -ObjectID $SPObjectID -KeyId <PASTE_KEYID_VALUE>
2830
```
2931

30-
{{ Add example description here }}
32+
The first part of the examples stores the ObjectID of your service principal in the $SPObjectID variable. The second part gets all the Key Credentials for the service principal.
33+
Copy the preferred **KeyID** associated with the certificate to be removed and paste it at the **<PASTE_KEYID_VALUE>** in the third part of the example.<br>
34+
This removes the certificate (key credential) from the service principal configuration.
3135

3236
## PARAMETERS
3337

0 commit comments

Comments
 (0)