add an additional variable
This way the output should appear before the Read-Host command
This commit is contained in:
parent
894b32da60
commit
7708a20756
|
@ -124,7 +124,7 @@ Function Get-LockedOutLocation
|
|||
Write-Warning $_
|
||||
Continue
|
||||
}#end catch
|
||||
Foreach($Event in $LockedOutEvents)
|
||||
$Events = Foreach($Event in $LockedOutEvents)
|
||||
{
|
||||
If($Event | Where {$_.Properties[2].value -match $UserInfo.SID.Value})
|
||||
{
|
||||
|
@ -145,6 +145,7 @@ Function Get-LockedOutLocation
|
|||
}#end ifevent
|
||||
|
||||
}#end foreach lockedout event
|
||||
$Events | Format-List
|
||||
|
||||
}#end process
|
||||
|
||||
|
@ -152,3 +153,4 @@ Function Get-LockedOutLocation
|
|||
|
||||
$username = Read-Host 'Please enter a username'
|
||||
Get-LockedOutLocation -Identity $username
|
||||
Read-Host 'Press a key to quit'
|
||||
|
|
Reference in New Issue