Highlighted
Micro Focus Expert
Micro Focus Expert
114 views

OMW-Support Tip:How to use Ovdeploy accurately to retrieve environment variables?

 

When submitting an OVDEPLOY command on a Management server for windows 9.x to check on the environment variables of your nodes, you might face the issue where you will receive the information pertaining to the server and not the node.

 

Example:

 

Let's check for the data directory on the Server and node:

 

On the management server (OMWSERVER) the data directory is located at:

 

C:\ProgramData\HP\HP BTO Software

 

On the managed node (NODE001) the data directory is located at

 

D:\HP\HP BTO Software

 

But, when you issued the command:

 

ovdeploy -cmd "echo %OvDataDir%" -host NODE001

 

The result is the Management server data directory.

 

C:\ProgramData\HP\HP BTO Software

 

How to work around this issue?

 

The local command (CMD) shell is resolving any string kept in %VARIABLENAME% and passing it to the command. To escape the local Command shell please encloses the VARIABLENAME in extra quotes "". Example ovdeploy -cmd "echo" -par "'%"ovdatadir"%'" -host <hostname>.

 

 

HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.