Get-AzureADMSServicePrincipal
Permet d’obtenir un principal de service.
Syntax
Get-AzureADMSServicePrincipal
[-All <Boolean>]
[-Top <Int32>]
[-Filter <String>]
[-Select <String>]
[<CommonParameters>]
Get-AzureADMSServicePrincipal
[-SearchString <String>]
[-All <Boolean>]
[<CommonParameters>]
Get-AzureADMSServicePrincipal
-Id <String>
[-All <Boolean>]
[-Select <String>]
[<CommonParameters>]
Description
L’applet de commande Get-AzureADMSServicePrincipal obtient un principal de service dans Azure Active Directory (Azure AD).
Exemples
Exemple 1
PS C:\> Get-AzureADMSServicePrincipal
Id : 055aa618-7c74-40ee-b278-75545562c3d6
ObjectId :
DeletionTimestamp :
AccountEnabled : true
AppId : 6ff5f225-c1d3-46cc-b89e-39e679ff746f
AppDisplayName : App Name
ApplicationTemplateId :
AppRoleAssignmentRequired : False
CustomSecurityAttributes :
DisplayName : App Name
ErrorUrl :
LogoutUrl :
Homepage :
IsManagementRestricted :
SamlMetadataUrl :
MicrosoftFirstParty :
PublisherName : Microsoft Services
PreferredTokenSigningKeyThumbprint :
ReplyUrls : {}
ServicePrincipalNames : {6ff5f225-c1d3-46cc-b89e-39e679ff746f}
Tags : {}
KeyCredentials : {}
PasswordCredentials : {}
Obtenez tous les principaux de service à partir du répertoire.
Exemple 2
PS C:\> $sp = Get-AzureADMSServicePrincipal -Id 4a7c15df-ac88-44f3-84c6-fd0812701f29
Obtenez un principal de service par ID.
Exemple 3
PS C:\> $ServicePrincipalId = (Get-AzureADMSServicePrincipal -Top 1).Id
PS C:\> Get-AzureADMSServicePrincipal $ServicePrincipalId
La première commande obtient l’ID d’un principal de service à l’aide de l’applet de commande Get-AzureADMSServicePrincipal. La commande stocke l’ID dans la variable $ServicePrincipalId.
La deuxième commande obtient le principal de service identifié par $ServicePrincipalId.
Exemple 4
PS C:\> Get-AzureADMSServicePrincipal -Select CustomSecurityAttributes
Get-AzureADMSServicePrincipal -Id 7d194b0c-bf17-40ff-9f7f-4b671de8dc20 -Select "CustomSecurityAttributes, Id"
Répertorier les attributions d’attributs de sécurité personnalisées pour une application (principal de service).
Paramètres
-All
Si la valeur est true, retourne tous les objets serviceprincipal. Si la valeur est false, retournez le nombre d’objets spécifiés par le paramètre Top
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Filter
Spécifie une instruction de filtre oData v3.0. Ce paramètre contrôle les objets retournés.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Id
Spécifie l’ID d’un principal de service dans Azure AD.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SearchString
Spécifie une chaîne de recherche.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Select
Spécifie les propriétés à retourner sur l’objet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Top
Spécifie le nombre maximal d’enregistrements à retourner.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Entrées
Nullable<T>[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Sorties
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour