Skip to content

Commit cb3081b

Browse files
authored
Refactor README for script usage and file names
Updated README to clarify script usage and rename files.
1 parent 7c2522f commit cb3081b

1 file changed

Lines changed: 28 additions & 12 deletions

File tree

README.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ PowerShell-Scripts/
2525
│ └── grant_consent_MSGraph.ps1
2626
│ └── sendmail.py
2727
│ └── Check-AllPowerfulAzurePerms3.ps1
28-
│ └── enum_entra_admins.ps1 & find_disabled_ad_accounts.ps1
28+
│ └── enum_entra_admins.ps1
29+
│ └── find_disabled_accounts.ps1
2930
│ └── watch_X_job3.ps1
3031
│ └── Audit-AllUsersRolePerms.ps1
3132
│ └── Get-DisabledUsersLicenses6.ps1
@@ -133,7 +134,9 @@ Notice the MFA requirement error description, as expected.
133134
![Notice the MFA requirement](Azure%20Active%20Directory/docs/image-20250514-202748.png)
134135

135136
Use like so:
136-
`.\get_az_token.ps1 -TenantId "xxx" -Username "you@foo.bar" -ClientId "yyy" -AcknowledgeAuthorizedTesting`
137+
```powershell
138+
.\get_az_token.ps1 -TenantId "xxx" -Username "you@foo.bar" -ClientId "yyy" -AcknowledgeAuthorizedTesting
139+
```
137140

138141
---
139142
### `aadinternals_audit6.ps1`
@@ -156,7 +159,9 @@ Performs a read-only analysis of the user-assignment scope for Microsoft Entra C
156159
The script does not calculate whether every policy will trigger during a specific authentication attempt. Conditional Access runtime conditions such as cloud application, device compliance, platform, location, user or sign-in risk, client type, and authentication flow require the Conditional Access What If tool or sign-in-log evidence.
157160

158161
Use like so:
159-
`.\get_policies.ps1 -UserPrincipalName "foo@contoso.com" -OutputCsv ".\ConditionalAccessUserTargeting.csv"`
162+
```powershell
163+
.\get_policies.ps1 -UserPrincipalName "foo@contoso.com" -OutputCsv ".\ConditionalAccessUserTargeting.csv"
164+
```
160165

161166
Microsoft Graph Command Line Tools must be granted. If not you will be prompted like so:
162167

@@ -169,9 +174,11 @@ Demonstrates how a privileged Microsoft Graph administrator can programmatically
169174
This administrative workflow illustrates one mechanism that can be abused after a highly privileged identity or application is compromised. The script does not create a malicious application, perform consent phishing, obtain tokens, or independently bypass MFA. Because it modifies tenant consent and application assignments using highly privileged Graph permissions, it should be used only in an isolated lab or explicitly authorized administrative workflow.
170175

171176
Use like so:
172-
`.\grant_consent_MSGraph.ps1 -ClientAppId "11111111-1111-1111-1111-111111111111"`
177+
```powershell
178+
.\grant_consent_MSGraph.ps1 -ClientAppId "11111111-1111-1111-1111-111111111111"
173179
174-
`.\grant_consent_MSGraph.ps1 -UserPrincipalName "alice@contoso.com"`
180+
.\grant_consent_MSGraph.ps1 -UserPrincipalName "alice@contoso.com"
181+
```
175182

176183

177184
---
@@ -212,18 +219,27 @@ This read-only script audits Azure Storage accounts across all subscriptions acc
212219
This script consumes the container CSV generated by Get-AzureStorageAnonymousAccess.ps1 and performs unauthenticated curl.exe tests against each applicable Blob container. It checks anonymous container enumeration and can optionally validate exact-object access using a one-byte range request when the CSV contains an ExactBlobName column.
213220

214221
Use like so:
215-
`.\Test-AzureBlobAnonymousEndpoints.ps1 -InputCsv "C:\Users\mario\StorageContainerPublicAccessDetails-20260730-003512.csv"`
222+
```powershell
223+
.\Test-AzureBlobAnonymousEndpoints.ps1 -InputCsv "C:\Users\mario\StorageContainerPublicAccessDetails-20260730-003512.csv"
224+
```
225+
226+
227+
---
228+
### `enum_entra_admins.ps1 `
216229

230+
Searches Microsoft Entra for groups whose display names match a configurable administrator-like pattern and exports their direct and nested user members to AdminLikeAccounts_Report.csv. The report includes each user’s current Entra account status and hybrid synchronization attributes, but the naming match is a discovery signal and does not by itself prove that a group grants privileged access.
231+
By default, the script searches for group names containing administrator and resolves membership transitively, including users inherited through nested groups.
217232

218233
---
219-
### `enum_entra_admins.ps1 & find_disabled_ad_accounts.ps1`
234+
### `find_disabled_accounts.ps1`
220235

221-
enum_entra_admins.ps1 will look at Entra groups with "administrator" as a display name.
222-
Then it will try to find users of that group, and output data to AdminLikeAccounts_Report.csv
236+
Reads any CSV containing Microsoft Entra user principal names or object IDs and checks whether each unique account is enabled or disabled in Entra ID. The script automatically detects common identity-column names, exports disabled accounts to DisabledAccounts_Report.csv, and can optionally produce a complete report containing enabled, disabled, unresolved, and failed lookups.
237+
The script queries Microsoft Graph and therefore does not require a corporate network, VPN, domain controller, RSAT, or the on-premises Active Directory PowerShell module
238+
239+
```powershell
240+
.\find_disabled_accounts.ps1 -CsvPath ".\accounts.csv"
241+
```
223242

224-
find_disabled_ad_accounts.ps1 will read that input file AdminLikeAccounts_Report.csv and try to determine if any of these admins is "disabled".
225-
It will produce a spreadsheet file named DisabledAccounts_Report.csv
226-
Admins should investigate these files and clean up their AD/AAD as needed.
227243

228244
---
229245
### `Get-DisabledUsersLicenses6.ps1`

0 commit comments

Comments
 (0)