Skip to content

Commit

Permalink
updated help to include -Timeout parameter for GetADUserLastLogon and…
Browse files Browse the repository at this point in the history
… Get-ADUserLockoutStatus
  • Loading branch information
RobHolme committed Mar 19, 2023
1 parent 0e0342f commit 9e0d62b
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ Find-ADGroup [-Name] <String> [<CommonParameters>]
__-Name \<string\>__: The name of the group

### Examples
```Find-ADGroup -Name "VPN Users"```
```
Find-ADGroup -Name "VPN Users"
```

## Get-ADGroupMembers
### Description
Expand All @@ -42,7 +44,9 @@ Get-ADGroupMembers [-Name] <String> [<CommonParameters>]
__-Name \<string\>__: The name of the group

### Examples
```Get-ADGroupMembers -Name "VPN Users"```
```
Get-ADGroupMembers -Name "VPN Users"
```

## Get-ADObjectGroupMembership
### Description
Expand Down Expand Up @@ -113,7 +117,7 @@ Query all domain controllers and return the most recent logon date/time. Exact m

### Syntax
```PowerShell
Get-ADUserLastLogon [-Identity] <String> [-ShowAllDomainControllers] [-SiteName <String>] [<CommonParameters>]
Get-ADUserLastLogon [-Identity] <String> [-ShowAllDomainControllers] [-SiteName <String>] [-Timeout <Int32>] [<CommonParameters>]
```
### Parameters
__-Identity \<string\>__: The user identity (samAccountName) to search for.
Expand All @@ -122,6 +126,8 @@ __-ShowAllDomainControllers__: List the logon times reported by each Domain Cont

__-SiteName \<string\>__: Only query Domain Controllers from this nominated site only.

__-Timeout \<int\>__: Timeout in seconds if Domain Controller does not respond (between 1 and 20 seconds). Defaults to 3 seconds.

### Examples
```
# Get last logon time for user 'rob' for all domain controllers in the current domain
Expand All @@ -131,6 +137,7 @@ Get-ADUserLastLogon -Identity rob
Get-ADUserLastLogon -Identity rob -SiteName default-first-site-name
```


## Get-ADSites
### Description
Return details of all sites in the current forest.
Expand Down Expand Up @@ -158,15 +165,17 @@ Query all domain controllers and return the lockout status for each account. Exa

### Syntax
```PowerShell
Get-ADUserLockoutStatus [-Identity] <String> [<CommonParameters>]
Get-ADUserLockoutStatus [-Identity] <String> [-Timeout <Int32>] [<CommonParameters>]
```
### Parameters
__-Identity \<string\>__: The user identity (samAccountName) to search for.

__-Timeout \<int\>__: Timeout in seconds if Domain Controller does not respond (between 1 and 20 seconds). Defaults to 3 seconds.

### Examples
```
# Get last lockout status for user 'rob' for all domain controllers in the current domain
Get-ADUserLockoutStatus -Identity rob
PS> Get-ADUserLockoutStatus -Identity rob
LogonID DisplayName LockoutStatus LockoutTime BadPwdCount LastBadPassword DomainController Site
------- ----------- ------------- ----------- ----------- --------------- ---------------- ----
Expand All @@ -185,4 +194,8 @@ Convert-ADTimestamp [-Value] <String> [<CommonParameters>]
```

### Examples
``` Convert-ADTimestamp -Value 132306069444066678```
```
PS> Convert-ADTimestamp -Value 132306069444066678
Monday, 6 April 2020 8:35:44 AM
```

0 comments on commit 9e0d62b

Please sign in to comment.