File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -171,12 +171,8 @@ if ($CloudAdminUserId.Count -gt 0) {
171
171
@ ($CloudAdminUserId ) | & {
172
172
process {
173
173
try {
174
- if ($_ -is [PSCustomObject ]) {
175
- $userObj = $_
176
- Write-Verbose " [$i ]: - Processing userId '$ ( $_.Id ) '."
177
- }
178
- else {
179
- Write-Verbose " [$i ]: - Processing userId '$_ '."
174
+ if ($_ -is [string ]) {
175
+ Write-Verbose " [$i ]: - Processing string userId '$_ '."
180
176
181
177
try {
182
178
$userObj = @ (
@@ -218,6 +214,10 @@ if ($CloudAdminUserId.Count -gt 0) {
218
214
return
219
215
}
220
216
}
217
+ else {
218
+ $userObj = $_
219
+ Write-Verbose " [$i ]: - Processing object userId '$ ( $_.Id ) '."
220
+ }
221
221
222
222
if (
223
223
$null -eq $userObj.onPremisesExtensionAttributes ." extensionAttribute$ReferenceExtensionAttribute " -or
@@ -354,7 +354,7 @@ if ($CloudAdminUserId.Count -gt 0) {
354
354
[void ] $return.Add ($refUserObj )
355
355
}
356
356
else {
357
- $existingRefUserObj.cloudAdminAccounts.Add ($userObj )
357
+ [ void ] $existingRefUserObj.cloudAdminAccounts.Add ($userObj )
358
358
}
359
359
}
360
360
finally {
You can’t perform that action at this time.
0 commit comments