# PSLastLogon.ps1
# PowerShell script to determine when each user in the domain last
# logged on.
#
# ----------------------------------------------------------------------
# Copyright (c) 2011 Richard L. Mueller
# Hilltop Lab web site - http://www.rlmueller.net
#
# This program queries every Domain Controller in the domain to find the
# largest (latest) value of the lastLogon attribute for each user. The
# last logon dates for each user are converted into local time. The
# times are adjusted for daylight savings time, as presently configured.
Trap {"Error: $_"; Break;}
$D = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
$Domain = [ADSI]"LDAP://$D"
$Searcher = New-Object System.DirectoryServices.DirectorySearcher
$Searcher.PageSize = 200
$Searcher.SearchScope = "subtree"
$Searcher.Filter = "(&(objectCategory=person)(objectClass=user))"
$Searcher.PropertiesToLoad.Add("distinguishedName") > $Null
$Searcher.PropertiesToLoad.Add("lastLogon") > $Null
# Create hash table of users and their last logon dates.
$arrUsers = @{}
# Enumerate all Domain Controllers.
ForEach ($DC In $D.DomainControllers)
{
$Server = $DC.Name
$Test = $Server -replace "\..*$",""
$Test = $Test.ToUpper()
$Test
if (!($Test.startswith("SECDC02"))) {
$Searcher.SearchRoot = "LDAP://$Server/" + $Domain.distinguishedName
$Results = $Searcher.FindAll()
ForEach ($Result In $Results)
{
$DN = $Result.Properties.Item("distinguishedName")
$LL = $Result.Properties.Item("lastLogon")
If ($LL.Count -eq 0)
{
$Last = [DateTime]0
}
Else
{
$Last = [DateTime]$LL.Item(0)
}
If ($Last -eq 0)
{
$LastLogon = $Last.AddYears(1600)
}
Else
{
$LastLogon = $Last.AddYears(1600).ToLocalTime()
}
If ($arrUsers.ContainsKey("$DN"))
{
If ($LastLogon -gt $arrUsers["$DN"])
{
$arrUsers["$DN"] = $LastLogon
}
}
Else
{
$arrUsers.Add("$DN", $LastLogon)
}
}#foreach
}#if
}#foreach
# Output latest last logon date for each user.
$Users = $arrUsers.Keys
ForEach ($DN In $Users)
{
$Date = $arrUsers["$DN"]
"$DN;$Date"
}
5/25/2011
Last Logon Date
How to get your host talking with your Virtual Machine with Virtual Server 2005 R2 « Matthew Cosier’s Blog
MS Virtual Server 2005 R2: "How to get your host talking with your Virtual Machine with Virtual Server 2005 R2"
Filtering DSCP
Filtering DSCP
The second byte in the IPv4 header (aka “those bits you’ve probably never, ever looked at”) is used for Differentiated Services, or DiffServ. It’s split into two parts: the 6 most significant bits define the DSCP (differentiated services code point) and the two least significant bits are for ECN (explicit congestion notification). You can use DSCP to divide your traffic into different classes. For example, Asterisk might use the following DiffServ value, which corresponds EF (Expedited Forwarding):
DSCP ECN
10111000
If your networking equipment is sufficiently aware, this traffic will receive preferential treatment."
Wireshark Blog
The second byte in the IPv4 header (aka “those bits you’ve probably never, ever looked at”) is used for Differentiated Services, or DiffServ. It’s split into two parts: the 6 most significant bits define the DSCP (differentiated services code point) and the two least significant bits are for ECN (explicit congestion notification). You can use DSCP to divide your traffic into different classes. For example, Asterisk might use the following DiffServ value, which corresponds EF (Expedited Forwarding):
DSCP ECN
10111000
If your networking equipment is sufficiently aware, this traffic will receive preferential treatment."
Wireshark Blog
http://sourceforge.net/projects/krut/
Krut Computer Recorder
This screencast tool records audio and video from your computer screen into .mov-files and .wav-files. It could also be used to record streaming video and audio.
http://sourceforge.net/projects/krut/
This screencast tool records audio and video from your computer screen into .mov-files and .wav-files. It could also be used to record streaming video and audio.
http://sourceforge.net/projects/krut/
VMware Site Recovery Manager Service Account | Jeremy Waldrop's Blog
VMware Site Recovery Manager Service Account | Jeremy Waldrop's Blog: "VMware Site Recovery Manager Service Account"
This would have been nice to know before reinstalling it.
This would have been nice to know before reinstalling it.
Subscribe to:
Posts (Atom)