Wednesday 25 September 2013

Get product keys of Local and Remote systems


If you want to find MS OS Key for a single computer or multiple computers in a domain ,follow the below procedure.

1. Download the script from below Microsoft website

       http://gallery.technet.microsoft.com/Get-product-keys-of-local-83b4ce97

2. Copy Get-ProductKey.ps1 file to one of the folder in C Drive.In my case I have created scripts folder in      C Drive
3. Open PowerShell with Run as administrator
    Run below command:  
                         Import-Module C:\scripts\Get-ProductKey.ps1

   Note: If you are using 64 bit OS you will get below error

Import-Module : File C:\scripts\Get-ProductKey.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ Import-Module C:\scripts\Get-ProductKey.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [Import-Module], PSSecurityException

    + FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleCommand

   Please run below command to resolve above issue
                         Set-ExecutionPolicy Unrestricted



4. Run below command to get the key
                        Get-ProductKey -Computername xxxxxx

        (xxxxx is the computername)


   If you want get the more computer keys use comma symbol
                       Get-ProductKey -Computername xxxxxx,yyyyyy,zzzzzz

Tuesday 24 September 2013

Forcefully Remove Trend Micro OfficeScan Client

Some times Officescan client is corrupted because of some reasons.If you are using login script for TrendMicro you will get below error after login to the machine.So we need to reinstall TrendMicro. Once after removed from control panel also we are not able to install and at the same time we will get same error"The OfficeScan client is already installed on this computer ".So we need to remove entries from Registry as well.Please follow below procedure to remove completely from our system.


1.Open services.msc and stop the following services.
  • Officescan NT Listener
  • Officescan NT Firewall (If enabled)
  • Officescan NT Proxy Service

 2.Run regedit and delete the following keys belonging to the following
HKLM\System\CurrentControlSet\Services:
  • Ntrtscan
  • Tmcfw
  • TmFilter
  • Tmlisten
  • TmPfw
  • TmPrefilter (For windows server 2003)
  • TmProxy
  • Vsapint

3.HKLM\Software\Trendmicro(or HKLM\Software\Wow6432Node\Trendmicro for 64-bit machines):
  • OfcWatchDog
  • Pc-cillinNT Corp or OfficescanCorp (Depending on client)
  • Remote agent
4.HKLM\Software\Microsoft\Windows\Current Version\Run:
  • Officescan NT Monitor
5.HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
  • Officescsn NT

6.Right click My Computer, Click Manage.Go to Device Manager and click show Hidden Devices and select Non-Plug and Play devices Right Click each of these devices and click Uninstall (Note: do not reboot at this time)
  • tmcomm
  • TrendMicro Filter
  • TrendMicro PreFilter (For server 2003)
  • Trendmicro Micro TDI Driver
  • Trendmicro VSAPI NT
7.Delete the Officescan Program group in the Programs' Start Menu
Then restart the computer Go to \Program Files\TrendMicro and delete the OfficScan client folder
Once Uninstalled reboot then try to install Trend Micro.
Please comment if you have any issues.