get-eventlog

    0熱度

    1回答

    我想獲取「Caller Computer Name」下列出的值並將其放入一個變量中,以便我可以使用它獲取計算機的IP地址在另一個命令。 這是我使用提取數據的代碼: $event= Get-EventLog -LogName Security -ComputerName $DC -InstanceId 4740 -Newest 1

    0熱度

    1回答

    Get-EventLog -Logname system -Source "Microsoft-Windows-GroupPolicy" -EntryType "Information"| group-object -property source | sort-object -property Time -descending 它確實將所有內容組合在一起並計算它,但我希望計數也是白天。 結果

    -1熱度

    1回答

    我有要求監視特定工作站的特定事件ID。 事件ID監視:監視特定事件ID爲特定的一組工作站 $Workstations = gc c:\NotBackedUp\Workstation.txt foreach ($Workstation in $Workstations) { $events = Get-EventLog -ComputerName $Workstation -LogNa

    0熱度

    1回答

    我試圖捕獲特定日期的日誌文件,無論我回去多少天,我都沒有收到任何結果。 Get-EventLog -LogName Application -EntryType Warning -Source MicrosoftDynamicsNAVClientWebClient | Select Message -ExpandProperty Message | Where { ($_.Message -mat

    3熱度

    1回答

    在事件查看器的安全部分中,有一列名爲「計算機」的列。 我使用powershell從昨天開始檢索「所有事件ID 100」,並顯示「event ID」和「computer」列。 Get-EventLog Security -After "2016-08-25 08:08:08" | Where-Object { ($_.instanceid) -eq 100 } | select-object "co

    0熱度

    1回答

    我是一個SQL數據庫管理員,要的n00b PowerShell的,此刻 我需要在我的服務器查詢錯誤日誌中的錯誤和警告具有sysadmin的職責任務。 用我自己的谷歌福,並從this線程我能得到這個工作幫助: $computers = Get-Content "C:\Servers\ServerList_Short.txt"; # QUERY COMPUTER SYSTEM EVENT LOG

    0熱度

    3回答

    我在寫入TXT文件時遇到了寫入get-eventlog函數的問題。 這是我LogWrite功能: #Log Function $Logfile = "..\Logs\$(gc env:computername)_Outlook.log" $Stamp = (Get-Date).toString("yyyy/MM/dd HH:mm:ss") Function LogWrite {

    0熱度

    1回答

    我有一個Windows窗體(在PowerShell中),並且窗體有一個onclick事件按鈕,但onclick中的命令未運行。我不知道爲什麼,因爲它可以運行sepratley。我的sciptblock在這裏: [void][reflection.assembly]::loadwithpartialname("System.Windows.Forms") $form = New-Object Sy

    1熱度

    1回答

    下面的PowerShell腳本讀取今天所有的系統故障事件僅存在的 - 它的工作原理: Get-EventLog System -After ([datetime]::Today) | Where-Object { $_.EntryType -eq "Error" } 但它可能需要幾秒鐘來運行:我懷疑這是因爲first'Get-事件日誌」 cmdlet的是產生首先是全部事件的完整列表;那麼'Wh

    1熱度

    1回答

    我試圖使用Get-事件日誌命令行從事件日誌讀取所有的日誌文件來獲取所有日誌(應用程序,系統,安全性等) Get-EventLog -LogName Application, Security -after 09/15/2016 -Before 09/17/2016 相反-LogName應用,我需要應用程序,系統,安全等所有日誌。 任何幫助?