Dear nilesh,
Actually in perl sdk ,it can do that .You can use data Object CustomizationSysprep for windows and CustomizationLinuxPrep for linux vm .it is not so hard .
you can referred this page :http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/index-do_types.html