PowerShell: Find a Specific Event ID


We have a bunch Windows servers having the notorious 333 error issue periodically. To catch this error as soon as possible, I wrote a script and added it into schedule tasks. $Servers = Get-Content servers_list.txt Foreach ($Server in $Servers) { Write-Host -backgroundcolor yellow **************$Server********************* Get-EventLog -ComputerName $Server -LogName System -After (Get-Date).date | Where-Object {$_.EventID -eq … Continue reading PowerShell: Find a Specific Event ID

PowerShell: Get DHCP Information


To get the information like how many computers are in the domain, how many are not in the domain, how many computers are responsive. I wrote the following script. 1) Create a txt file named dhcp_scope.txt under the Windows folder in the DHCP server, and add the scope into the file. e.g. 172.29.1.0 172.29.2.0 172.29.3.0 … Continue reading PowerShell: Get DHCP Information

PowerShell: Find Duplicated ePO GUID


McAfee ePO (ePolicy Orchestrator) client may have duplicated GUID when the computer restore to a previous system status or the computer is a clone of another one. I wrote a script to list the computer names with duplicated GUID, so I can target and process them. Remove-Item machines_draft.txt# copy the ePO server logCopy-Item "\\epo-server-name\c$\Program Files\McAfee\ePolicy … Continue reading PowerShell: Find Duplicated ePO GUID