Get-EntraDeletedAdministrativeUnit
Retrieves the list of previously deleted administrative units.
Syntax
Get-EntraDeletedAdministrativeUnit
[-Filter <String>]
[-All]
[-Top <Int32>]
[-Property <String[]>]
[<CommonParameters>]
Get-EntraDeletedAdministrativeUnit
[-SearchString <String>]
[-All]
[-Property <String[]>]
[<CommonParameters>]
Description
The Get-EntraDeletedAdministrativeUnit
cmdlet Retrieves the list of previously deleted administrative units.
Examples
Example 1: Get list of deleted administrative units
Connect-Entra -Scopes 'AdministrativeUnit.Read.All'
Get-EntraDeletedAdministrativeUnit
DeletedDateTime Id Description DisplayName Visibility
--------------- -- ----------- ----------- ----------
11/14/2024 6:37:49 AM gggggggg-8888-9999-aaaa-hhhhhhhhhhhh Americas Administrative Unit Americas Administrative Unit
10/21/2024 8:27:52 AM cccccccc-4444-5555-6666-dddddddddddd EMEA Administrative Unit ADC Americas Administrative Unit
This cmdlet retrieves the list of deleted administrative units.
Example 2: Get list of deleted administrative units using All parameter
Connect-Entra -Scopes 'AdministrativeUnit.Read.All'
Get-EntraDeletedAdministrativeUnit -All
DeletedDateTime Id Description DisplayName Visibility
--------------- -- ----------- ----------- ----------
11/14/2024 6:37:49 AM gggggggg-8888-9999-aaaa-hhhhhhhhhhhh Americas Administrative Unit Americas Administrative Unit
10/21/2024 8:27:52 AM cccccccc-4444-5555-6666-dddddddddddd EMEA Administrative Unit ADC Americas Administrative Unit
This cmdlet retrieves the list of deleted administrative units using All parameter.
Example 3: Get top two deleted administrative units
Connect-Entra -Scopes 'AdministrativeUnit.Read.All'
Get-EntraDeletedAdministrativeUnit -Top 2
DeletedDateTime Id Description DisplayName Visibility
--------------- -- ----------- ----------- ----------
11/14/2024 6:37:49 AM gggggggg-8888-9999-aaaa-hhhhhhhhhhhh Americas Administrative Unit Americas Administrative Unit
10/21/2024 8:27:52 AM cccccccc-4444-5555-6666-dddddddddddd EMEA Administrative Unit ADC Americas Administrative Unit
This cmdlet retrieves top two deleted administrative units.
Example 4: Get deleted administrative units using SearchString parameter
Connect-Entra -Scopes 'AdministrativeUnit.Read.All'
Get-EntraDeletedAdministrativeUnit -SearchString 'Americas Administrative Unit'
DeletedDateTime Id Description DisplayName Visibility
--------------- -- ----------- ----------- ----------
11/14/2024 6:37:49 AM gggggggg-8888-9999-aaaa-hhhhhhhhhhhh Americas Administrative Unit Americas Administrative Unit
This cmdlet retrieves deleted administrative units using SearchString parameter.
Example 5: Get deleted administrative units filter by display name
Connect-Entra -Scopes 'AdministrativeUnit.Read.All'
Get-EntraDeletedAdministrativeUnit -Filter "DisplayName eq 'Americas Administrative Unit'"
DeletedDateTime Id Description DisplayName Visibility
--------------- -- ----------- ----------- ----------
11/14/2024 6:37:49 AM gggggggg-8888-9999-aaaa-hhhhhhhhhhhh Americas Administrative Unit Americas Administrative Unit
This cmdlet retrieves deleted administrative units having specified display name.
Parameters
-All
List all pages.
Type: | System.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Filter
Retrieve only those deleted administrative units that satisfy the filter.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Property
Specifies properties to be returned
Type: | System.String[] |
Aliases: | Select |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SearchString
Retrieve only those administrative units that satisfy the -SearchString value.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Top
The maximum number of administrative units.
Type: | System.Int32 |
Aliases: | Limit |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
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]]
Outputs
System.Object