iT邦幫忙

0

Windows Server 2008 R2-SP1 User登入記錄

[環境]:Windows Server 2008 R2-SP1<=DC
..........XP,Win 7
[問題]:
1.在2008R2為DC下,可看到網域帳號 AAA現在有登入到哪台電腦嗎
2.網域帳號 AAA 除了在[AD使用者和電腦]下,看到內容外,還有甚麼方式可看到更詳細的資料?
譬如:最後登入的時間,...
<<感謝>>

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

0
sct
iT邦新手 3 級 ‧ 2011-08-17 13:40:25

切換檢視到進階模式,查閱其他的屬性!

2
Ray
iT邦大神 1 級 ‧ 2011-08-17 17:05:44

請服用 PowerShell Script:

&lt;pre class="c" name="code">Import-Module ActiveDirectory

function Get-ADUserLastLogon([string]$userName)
{
  $dcs = Get-ADDomainController -Filter {Name -like "*"}
  $time = 0
  foreach($dc in $dcs)
  { 
    $hostname = $dc.HostName
    $user = Get-ADUser $userName | Get-ADObject -Properties lastLogon 
    if($user.LastLogon -gt $time) 
    {
      $time = $user.LastLogon
    }
  }
  $dt = [DateTime]::FromFileTime($time)
  Write-Host $username "last logged on at:" $dt }

Get-ADUserLastLogon -UserName administrator
Ray iT邦大神 1 級 ‧ 2011-08-17 17:11:00 檢舉

或是你要一行打死也可以:

&lt;pre class="c" name="code">Import-Module ActiveDirectory ; [DateTime]::FromFileTime((Get-ADUser administrator | Get-ADObject -Properties lastLogon ).lastlogon)

我要發表回答

立即登入回答