PowerShell: Read Computer Information


Sometimes, I need to check the information of a list of servers. To get it done just in one shot, script is my best choice. Here is a example to check my local machine's info: $Machine = "localhost" $OS = Get-WmiObject -Class Win32_OperatingSystem -ComputerName $Machine $CS = Get-WmiObject -Class Win32_ComputerSystem -ComputerName $Machine $CPU = Get-WmiObject … Continue reading PowerShell: Read Computer Information

333 Error on Citrix Servers


Spent couple weeks monitoring and researching, now I can draw a conclusion of the root cause of 333 error in the Citrix/ Terminal Servers. Simply speaking, it is caused by that the servers run out of resources on the 32 bits Windows server due to the limits of paged pool size (650M) and non-paged pool … Continue reading 333 Error on Citrix Servers

PowerShell: Uninstall Software Remotely


I will need to remove a software from more than 30 Windows 2003 servers once I confirmed it has the memory leaking bug. To make the job easier, I prefer to use script (as always): $app = Get-WmiObject -Class Win32_Product -ComputerName (Get-Content servers.txt) | Where-Object {$_.Name -match "Software Name"} $app.Uninstall() NOTE: 1) Win32_Product WMI class is … Continue reading PowerShell: Uninstall Software Remotely

PowerShell: Check Service Status


To ensure the Backup Exec Agent service running OK on each cluster nodes. I created a list to include each nodes and named it as CS_servers.txt, then use the following script to get the status of it. Get-WmiObject win32_service -ComputerName (Get-Content CS_servers.txt) -Filter "name='BackupExecAgentAccelerator'" | select __server,name,startmode,state,status The results are like: __SERVER  : CS-node-01 name      … Continue reading PowerShell: Check Service Status

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