PowerShell script to find Log mode, and max Log file size of Security Log for each server

#This PowerShell script will give the Log mode and the max log file size of Eventvwr -> Security Log for each server with OS 2008R2 and above.

## Servers which we failed to connect or unable to get info are collected in a txt file.
### writing credits : VM ###
############################################################################################################

$servers = Get-Content “D:\temp\test4.txt”
$result = @()
$finalresult = @()

foreach ($name in $servers)
{
$result = Get-WinEvent -listlog Security -ComputerName $name | select LogMode, LogName , @{n=”ServerName”;e={$name }} # , MaximumSizeinBytes
$finalresult+=$result
if (!$result) { Write “No info on server $name” | out-file -Append “D:\temp\failed-security.txt” -NoClobber }
$srv = $null
$result = $null
}

$finalresult | export-csv “D:\temp\Security-2k8-12-Status.csv” -NoTypeInformation

 

Advertisements

Workflowy – simple, great tool

Workflowy.com is an online workflow and to-do list. Text based, web-based application, with a very short learning curve, and easy to use.

Only cons I see are: it cannot yet sync or integrate with any other apps, and has no offline support.

Check its reviews on Youtube and this article .