Get-EntraDeletedUser
Recupera gli utenti eliminati soft (eliminati di recente) in Microsoft Entra ID.
Sintassi
GetQuery (Impostazione predefinita)
Get-EntraDeletedUser
[-Top <Int32>]
[-All]
[-Filter <String>]
[-Property <String[]>]
[<CommonParameters>]
GetVague
Get-EntraDeletedUser
[-SearchString <String>]
[-All]
[-Property <String[]>]
[<CommonParameters>]
GetById
Get-EntraDeletedUser
-UserId <String>
[-All]
[-Property <String[]>]
[<CommonParameters>]
Descrizione
Il Get-EntraDeletedUser cmdlet recupera gli utenti eliminati distribuiti (eliminati di recente) dalla directory. Gli utenti eliminati possono essere recuperati entro 30 giorni, dopo il quale vengono eliminati definitivamente.
Esempio
Esempio 1: Ottenere utenti eliminati nella directory
Connect-Entra -Scopes 'User.Read.All'
Get-EntraDeletedUser | Select-Object Id, UserPrincipalName, DisplayName, AccountEnabled, DeletedDateTime, DeletionAgeInDays, UserType | Format-Table -AutoSize
Id UserPrincipalName DisplayName AccountEnabled DeletedDateTime DeletionAgeInDays UserType
-- ----------------- ----------- -------------- --------------- ----------------- --------
dddddddd-3333-4444-5555-eeeeeeeeeeee dddddddd-3333-4444-5555-eeeeeeeeeeeeAveryS@contoso.com Avery Smith False 2/12/2025 1:15:34 PM 3 Member
In questo esempio viene illustrato come recuperare tutti gli utenti eliminati ripristinabili nella Microsoft Entra ID.
Esempio 2: Ottenere utenti eliminati nella directory usando il parametro All
Connect-Entra -Scopes 'User.Read.All'
Get-EntraDeletedUser -All | Select-Object Id, UserPrincipalName, DisplayName, AccountEnabled, DeletedDateTime, DeletionAgeInDays, UserType | Format-Table -AutoSize
Id UserPrincipalName DisplayName AccountEnabled DeletedDateTime DeletionAgeInDays UserType
-- ----------------- ----------- -------------- --------------- ----------------- --------
dddddddd-3333-4444-5555-eeeeeeeeeeee dddddddd-3333-4444-5555-eeeeeeeeeeeeAveryS@contoso.com Avery Smith False 2/12/2025 1:15:34 PM 3 Member
In questo esempio viene illustrato come recuperare tutti gli utenti eliminati ripristinabili usando il parametro All.
Esempio 3: Ottenere i primi due utenti eliminati
Connect-Entra -Scopes 'User.Read.All'
Get-EntraDeletedUser -Top 2 | Select-Object Id, UserPrincipalName, DisplayName, AccountEnabled, DeletedDateTime, DeletionAgeInDays, UserType | Format-Table -AutoSize
Id UserPrincipalName DisplayName AccountEnabled DeletedDateTime DeletionAgeInDays UserType
-- ----------------- ----------- -------------- --------------- ----------------- --------
dddddddd-3333-4444-5555-eeeeeeeeeeee dddddddd-3333-4444-5555-eeeeeeeeeeeeAveryS@contoso.com Avery Smith False 2/12/2025 1:15:34 PM 3 Member
In questo esempio viene illustrato come recuperare i primi due utenti eliminati ripristinabili nella directory. È possibile usare -Limit come alias per -Top.
Esempio 4: Ottenere utenti eliminati contenenti la stringa 'Avery Smith'
Connect-Entra -Scopes 'User.Read.All'
Get-EntraDeletedUser -SearchString 'Avery Smith' | Select-Object Id, UserPrincipalName, DisplayName, AccountEnabled, DeletedDateTime, DeletionAgeInDays, UserType | Format-Table -AutoSize
Id UserPrincipalName DisplayName AccountEnabled DeletedDateTime DeletionAgeInDays UserType
-- ----------------- ----------- -------------- --------------- ----------------- --------
dddddddd-3333-4444-5555-eeeeeeeeeeee dddddddd-3333-4444-5555-eeeeeeeeeeeeAveryS@contoso.com Avery Smith False 2/12/2025 1:15:34 PM 3 Member
In questo esempio viene illustrato come recuperare gli utenti eliminati nella directory contenente la stringa specificata.
Esempio 5: Filtrare gli utenti eliminati in base al nome visualizzato
Connect-Entra -Scopes 'User.Read.All'
Get-EntraDeletedUser -Filter "displayName eq 'Avery Smith'" | Select-Object Id, UserPrincipalName, DisplayName, AccountEnabled, DeletedDateTime, DeletionAgeInDays, UserType | Format-Table -AutoSize
Id UserPrincipalName DisplayName AccountEnabled DeletedDateTime DeletionAgeInDays UserType
-- ----------------- ----------- -------------- --------------- ----------------- --------
dddddddd-3333-4444-5555-eeeeeeeeeeee dddddddd-3333-4444-5555-eeeeeeeeeeeeAveryS@contoso.com Avery Smith False 2/12/2025 1:15:34 PM 3 Member
In questo esempio viene illustrato come recuperare gli utenti eliminati nella directory, con il nome visualizzato specificato.
Esempio 6: Ottenere l'utente eliminato da UserId
Connect-Entra -Scopes 'User.Read.All'
Get-EntraDeletedUser -UserId 'dddddddd-3333-4444-5555-eeeeeeeeeeee' | Select-Object Id, UserPrincipalName, DisplayName, AccountEnabled, DeletedDateTime, DeletionAgeInDays, UserType | Format-Table -AutoSize
Id UserPrincipalName DisplayName AccountEnabled DeletedDateTime DeletionAgeInDays UserType
-- ----------------- ----------- -------------- --------------- ----------------- --------
dddddddd-3333-4444-5555-eeeeeeeeeeee dddddddd-3333-4444-5555-eeeeeeeeeeeeAveryS@contoso.com Avery Smith False 2/12/2025 1:15:34 PM 3 Member
In questo esempio viene illustrato come recuperare l'utente eliminato specificato da UserId.
-
-UserIdparametro specifica l'id utente eliminato.
Parametri
-All
Elencare tutte le pagine.
Proprietà dei parametri
| Tipo: | System.Management.Automation.SwitchParameter |
| Valore predefinito: | False |
| Supporta i caratteri jolly: | False |
| DontShow: | False |
Set di parametri
(All)
| Posizione: | Named |
| Obbligatorio: | False |
| Valore dalla pipeline: | False |
| Valore dalla pipeline in base al nome della proprietà: | False |
| Valore dagli argomenti rimanenti: | False |
-Filter
Specifica un'istruzione filtro OData v4.0. Questo parametro controlla gli oggetti restituiti.
Proprietà dei parametri
| Tipo: | System.String |
| Valore predefinito: | None |
| Supporta i caratteri jolly: | False |
| DontShow: | False |
Set di parametri
GetQuery
| Posizione: | Named |
| Obbligatorio: | False |
| Valore dalla pipeline: | True |
| Valore dalla pipeline in base al nome della proprietà: | True |
| Valore dagli argomenti rimanenti: | False |
-Property
Specifica le proprietà da restituire
Proprietà dei parametri
| Tipo: | System.String[] |
| Valore predefinito: | None |
| Supporta i caratteri jolly: | False |
| DontShow: | False |
| Alias: | Select |
Set di parametri
(All)
| Posizione: | Named |
| Obbligatorio: | False |
| Valore dalla pipeline: | False |
| Valore dalla pipeline in base al nome della proprietà: | False |
| Valore dagli argomenti rimanenti: | False |
-SearchString
Specifica una stringa di ricerca.
Proprietà dei parametri
| Tipo: | System.String |
| Valore predefinito: | None |
| Supporta i caratteri jolly: | False |
| DontShow: | False |
Set di parametri
GetVague
| Posizione: | Named |
| Obbligatorio: | False |
| Valore dalla pipeline: | True |
| Valore dalla pipeline in base al nome della proprietà: | True |
| Valore dagli argomenti rimanenti: | False |
-Top
Specifica il numero massimo di record da restituire.
Proprietà dei parametri
| Tipo: | System.Int32 |
| Valore predefinito: | None |
| Supporta i caratteri jolly: | False |
| DontShow: | False |
| Alias: | Limit |
Set di parametri
GetQuery
| Posizione: | Named |
| Obbligatorio: | False |
| Valore dalla pipeline: | True |
| Valore dalla pipeline in base al nome della proprietà: | True |
| Valore dagli argomenti rimanenti: | False |
-UserId
ObjectId o User Principal Name dell'utente eliminato da recuperare.
Proprietà dei parametri
| Tipo: | System.String |
| Valore predefinito: | None |
| Supporta i caratteri jolly: | False |
| DontShow: | False |
| Alias: | ObjectId, UPN, Identità, NomePrincipaleUtente, id |
Set di parametri
GetById
| Posizione: | Named |
| Obbligatorio: | True |
| Valore dalla pipeline: | True |
| Valore dalla pipeline in base al nome della proprietà: | True |
| Valore dagli argomenti rimanenti: | False |
CommonParameters
Questo cmdlet supporta i parametri comuni: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction e -WarningVariable. Per altre informazioni, vedi about_CommonParameters.
Input
System.String
System.Nullable'1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] System.Nullable'1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]