Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

using common services cli and setting the environment DCRCLIFILE

Hi,

I have been searching a way to automate the exporting the inventory of DCR using dcrcli. The stumbling block is in automatically entering the password.

Manually entering the username and password works(e.g. dcrcli -u <username> followed by password).

Documentation shows that the DCRCLIFILE environment should be set, but there is nothing (that I can find) that shows how to do this. I am running Windows 2003 server so I have found the environment settings in the registry and added a line;

DCRCLIFILE REG_EXPAND_SZ d:\temp.txt (where d:\temp.txt is the dir and file where the username and password is set (with one space between the username and password)).

This appears in the report from Collect Server Information.

However the result is;

"<dcrcli> * Warning * DCRCLIFILE Environment variable not set."

Using CiscoWorks Common Services 3.0.4.

4 REPLIES
Silver

Re: using common services cli and setting the environment DCRCLI

Hi Russel,

i guess the environment variables of Windows should be set:

- right click my computer and select "Porperties" from pulldown menu.

- Change to the tab "Advance"

- Press the button "Enviroment Variables"

- Under the bottom window "System Variables" press the button "New"

- Here enter the DCRCLIFILE as name and the path as value

Then it should work without restart. You may test this from the command line. Just enter set and you should find the added variable.

I did no tested this.

I hope that helps.

Best regards,

Frank

New Member

Re: using common services cli and setting the environment DCRCLI

Many thanks Frank.

This worked. It didn't need the registry setting after all (which I have now deleted).

(I was confused to start with because it didn't work in the command window that I was testing from. Then I remembered that the environment is only refreshed when opening a new command window.)

So everything sorted. :-)

Silver

Re: using common services cli and setting the environment DCRCLI

You can schedule the export of the DCR via the GUI. No need for using the cli

You can also create an entry for DCRCLIFILE under Controlpanel -> System -> Advanced -> Enviroment.

But you will have to use a proper scheduler that can load the profile of the user under which you set this variable.

Cheers,

Michel

Damn, Frank got there first

New Member

Re: using common services cli and setting the environment DCRCLI

Hi Michel,

Thanks for the info. I forgot about the GUI schedule. Temporary memory lapse.

Rgds

Russ

168
Views
0
Helpful
4
Replies