Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
232 changes: 107 additions & 125 deletions AzureADDeviceCleanup.ps1

Large diffs are not rendered by default.

Binary file added Outfile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed PS.PNG
Binary file not shown.
Binary file added PS1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PS2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AzureADDeviceCleanup PowerShell script helps to manage the stale devices in Azur
- Verifies the stale disabled devices as per the entered threshold days.
- Cleans the stale devices from Azure AD as per the entered threshold days.
- Cleans the stale disabled devices only from Azure AD as per the entered threshold days
- Checks if ‘MSOnline‘ module is installed and updated. If not, it takes case of this.
- Checks if ‘AzureAd‘ module is installed and updated. If not, it takes case of this.
- Checks if ‘ImportExcel‘ module is installed. If not, it installs and imports it.


Expand Down Expand Up @@ -56,10 +56,11 @@ Using AzureADDeviceCleanup PowerShell script, you can automate Azure AD devices

- Execute the PowerShell:

![PS output](https://github.com/mzmaili/AzureADDeviceCleanup/blob/master/PS.PNG)
![PS output](https://github.com/Sumanjit092/AzureADDeviceCleanup/blob/master/PS1.png)
![PS output](https://github.com/Sumanjit092/AzureADDeviceCleanup/blob/master/PS2.png)

- Excel output:
![CSVReport](https://github.com/mzmaili/AzureADDeviceCleanup/blob/master/Untitled.png)
![CSVReport](https://github.com/Sumanjit092/AzureADDeviceCleanup/blob/master/Outfile.png)


```azurepowershell
Expand All @@ -75,7 +76,7 @@ Using AzureADDeviceCleanup PowerShell script, you can automate Azure AD devices
.PARAMETER
ThresholdDays
Specifies the period of the last login.
Note: The default value is 90 days if this parameter is not configured.
Note: The default value is 180 days if this parameter is not configured.

.PARAMETER
Verify
Expand Down Expand Up @@ -116,7 +117,7 @@ Using AzureADDeviceCleanup PowerShell script, you can automate Azure AD devices

.EXAMPLE
.\AzureADDeviceCleanup.ps1 -Verify
Verifies the stale devices since 90 says that will be deleted when running the PowerShell with 'CleanDevices' parameter.
Verifies the stale devices since 180 says that will be deleted when running the PowerShell with 'CleanDevices' parameter.

.EXAMPLE
.\AzureADDeviceCleanup.ps1 -Verify -ThresholdDays <Number of Days>
Expand Down
Binary file removed Untitled.png
Binary file not shown.