Executing a command on a remote windows system using WMI
Usually we use psexec tool from sysinternals to execute any program on a remote system. There is another way to execute a command on a remote windows system via WMI (Windows Management Instrumentation). This function would be beneficial to QTP automators because its a vbscript function and can be used in their function libraries (after some modifications). All you have to do is call this function with the target system name, username, password and the command to execute. The output would be the process if of the process that was initated on the target system. Have fun…
Vbscript to revert a ESX Virtual machine snapshot
First of all, let me clarify that the snapshot restore is completely done by the VMWARE perl toolkit. But there may be instances where you cannot remember this long command to revert a virtual machine snapshot. You could create a vbscript function that will help you out with a much easier syntax . All you’ll need is the esx host name where the virtual machine is registered to, the login credentials to the esx host and the virtual machine name. Another advantage is you could use this from QTP to automate the vm snapshot restore process.
Read more »
Determine the mapped drives on QTP Client
You can use WMI Class Win32_LogicalDisk to find that out. With this class not only can we determine which drives are mapped to network shares, but we can also determine which network shares they map to. Please note that the DriveType equal to 4 represents a mapped network drive. For more details about Drivetype values, refer the WMI SDK. The WMI query returns a collection of mapped drives. DeviceID, which returns the drive letter for the drive; and ProviderName, which returns the network share the drive is mapped to .
Read more »
-
Archives
- June 2009 (1)
- April 2009 (1)
- March 2009 (1)
- August 2008 (5)
- July 2008 (4)
- May 2008 (2)
- April 2008 (3)
- February 2008 (3)
-
Categories
-
RSS
Entries RSS
Comments RSS