I have been using psexec and batch scripts to do some system management jobs remotely. Here are couple examples of frequently used ones. psexec \\computer_ip_address -u administrator –p ***** –c xxx.bat (xxx.bat can be any batch scripts you created) e.g: psexec \\172.29.16.10 –u administrator –p ******** –c disableFW.bat xxx.bat examples: 1) disableFW.bat: disable the Windows … Continue reading Batch Script: A Few Used With Psexec
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
PowerShell: Compare Text Files And Export Different Entries
I am not a great script writer. But I love using script, as it is simple but very handy Scenario: I got a long list of machines (all.txt) that need to be processed, and part of them have already been processed by a guy. And he send me a list (processed.txt) that he have done. … Continue reading PowerShell: Compare Text Files And Export Different Entries
PowerShell: Remove Remote Registry Keys
I wrote a power shell script to delete the duplicated ePO GUID stored in the Windows registry key. Firstly, I would like to know which machines are responsive. Then I need to find out whether I got the admin permission on the remote machines. Lastly, remove the specified reg keys. #Read the machine name data … Continue reading PowerShell: Remove Remote Registry Keys