Powershell

List Windows Logs

Powershell is really nice and useful. Although it requires a learning cost as most of the other languages, for windows admis it may make the life better and easier. In the sample below, all windows log file names are printed to the screen. By the way, if working with windows logs search or look automation,

Read on »

Windows Remote Computer Log

While managing or configuring windows servers from a management server, a log may be needed for servers being managed. For that purpose, following powershell command might be used. In this example, “RemoteComputerName” logs are displayed and filtered according to “Logname” and “EventID”. [code language=”powershell”] Get-WinEvent -ComputerName <RemoteComputerName> -Logname Microsoft-Windows-GroupPolicy/Operational` |where{$_.Id -eq 9999}|%{ $_.Message } [/code]

Read on »