How to report the ip address resolved of nslookup as a variable in the batch script

I have a batch script that performs a constant audit 'external server' living every minute and the activity is fed into a log file. The external server is on a dynamic ip address.

for example,.

Logfile = C:\Logfile.txt

echo control myserver... > Logfile

.

.

[see document test/myserver.domain.com]

However, I would like to write in the log IP address that is being tested.

That is to say

the my_server checking to 123.456.78.9 echo

Could someone tell how can I get the dns to resolve address from "myserver.domain.com' as a variable in order, can I use it

for example,.

RESOLVED_ADDRESS = (nslookup resolution results)

the my_server % RESOLVED_ADDRESS % control echo

Thank you

Hi Jimimaseye,

I suggest that you post the application on Microsoft TechNet forum because we have experts working on these issues. You can check the link to post the same query on TechNet:

http://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w7itpro

Please do not hesitate to contact us if you have other questions related to Windows.

Tags: Windows

Similar Questions

  • How to hide the user id and password in the batch scripts

    Hello

    Can help me hide the user id and the password in the batch scripts to automate the process of running script to export and action.

    Context: In my client project does not display user id and password that's why they are looking for guaranteed way to hide them.

    Thanks for your response in advance.

    Kind regards

    Sandra.

    Sandra,

    As stated by Craig Administrator's Guide is a good option.

    Let me give you a few steps I did in one of my projects.

    Open the command prompt and navigate to the location "C:\Oracle\Middleware\EPMSystem11R1\products\DataRelationshipManagement\client\batch-client"... here you can see many see as well other utilities.

    DRM-batch-customer - credentials.exe is the one that is used to encrypt the user name and password.

    Open this in the command prompt and choose the application that you want to encrypt the password.

    then remove the username and password from command script can run it... It does what you want

  • How to report the BIOS problem?

    Hello

    is it possible to report the BIOS problem so that a person of HP it will read and the problem will be solved if all goes well?

    To be concrete, there seems to be problem in BIOS F.02 installed on HP Mini 5103 causes of freeze if it has plugged the USB key with 'recursive partitioning' at startup. As a result, it is not possible to boot from live USB which was created from some ISO hybrids (e.g. direct ISOs of OpenSUSE recent). Since there are not many options to install the system on netbook, I think it is serious problem. My previous netbook Lenovo Ideapad S10 - 3 and also my work laptop and desktop have no problem to start with the USB stick containing "recursive partitioning", so it's certainly a problem (hopefully not feature) this concrete machine/BIOS.

    Thank you

    That's ok on the Bravo, I did nothing to help you again.  This link is for questions of security, but it is also for the firmware, so you can get away with sending them a note here:

    https://h41268.www4.HP.com/live/index.aspx?QID=11503

    - Or call them.

    http://welcome.HP.com/country/us/en/contact/phone_assist.html#section1

  • How to activate the vb script

    I'm trying to install the software for a usb graphics adapter, and I get the message that it can not install because the VB Script is not enabled. Help please!

    Hi SheilaBest,

    1. did you of recent changes on the computer?

    2. what software you are trying to install on the computer?

    3. are you able to install all other software on the computer?

    Method 1

    Try the step below and then try to install the software, check if it helps

    (a) in the Start menu, type cmd in the search field.

    (b) with the right button on cmd in the list of search results and click on run as administrator from the context menu. If Windows needs your permission to continue, click on continue. (If you are not connected as long as administrator, you will need to authenticate with an administrator account and the password).

    (c) in the command prompt window, enter the following command:

    regsvr32 vbscript.dll

    Method 2

    If the previous step fails then I suggest that scan you SFC on the computer that would be a system file corrupt on the computer search and replace.

    The analysis may take some time, so be patient. Windows allows to fix corrupt or missing files it finds. If the information of the installation CD is required to fix the problem, you may be asked to insert your Windows Vista installation CD.

    For more information please visit the link below.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

  • How to enable the Java Script function in APEX 4.2.6 running on the result of an Xquery query.

    How to take a SQL query result in the source section of an APEX "agenda of the page" field and allow this request to be formatted using XML in an HTML format for a Java Script file to perform a function on the result?

    Currently I have the following text:

    To query the DB table and format the result as HTML:

    SELECT XMLELEMENT ("UL id ="ticker01"', XMLAGG (XMLFOREST (Scroll_Mess AS LI))") "item UL' OF Web_Ticker where Mess_Id < 10 order by Mess_Id;


    That displays the following:


    < UL id = "ticker01" > < LI > HELLO < /LI > < LI > HELLO < /LI > < /UL id = "ticker01" >

    I need the output of this to be visible to a JScript function that is currently called the "head of page", but there doesn't seem to be its scope? The function works correctly if there is a list in the page field items 'Text element Pre' but does not work correctly when used in conjunction with the query to generate a table form.

    If everyone is happy to help I would be grateful .

    James.

    Solved!

    In order for the request to be part of the DOM of the page of the APEX, the Java Script allows to perform its function on the result marked "HTML" to query, you must set page of the apex on which the query resides and then add the inner text of this page to a second variable for which the function of web ticker can run on as follows:

    $(function() {})

    var x = $("#P9_TICKER_DATA");

    var y = x [0] .innerText;

    x.Append (y);

    $("UL#ticker01").liScroll ();

    });

    From there, on the Java script is able to properly see the result of the query in HTML format.

  • How to use the transformation script to add columns to the PK?

    I'm working on a script transformation that:
    -create a table
    -Adds the columns to the table
    -create a primary key for the table

    See the below script.
    Now, I want to add the primary key column.
    Documentation fix r: class IndexColumnUsage

    The Index of the class has a getter: getIndexColumnUsageList()
    and the list apply: applyIndexColumnUsageList

    Someone at - it an idea how to use these methods to add the column to the PK?

    I thank in advance.


    relational = model.getDesign () .getFirstOpenRelationalDesign ();
    table = relational.getTableSet () .createTable (null);
    table.setName ("TABLE");
    column = table.createColumn (null);
    column.setName ("COLUMN");
    index = table.createIndex (null);
    index.setName ("PK");
    index.setIndexState ("primary obligation");

    Hello

    If you have the column and index (both belonging to the same table) use:

    the index. Add (Column);

    to remove the column:

    the index. Remove (Column)

    Philippe

  • question about how to combine the two scripts.


    Hello

    I have a sql script that can display a table (or view) all the information, it works fine. I call it validate_table.sql, as below:

    command prompt
    accept invites owner "Enter table owner:
    accept invites from TABLE_NAME "Enter object (table/View...) "name:"


    column owner format a10 column 'owner '.
    column format a30 topic 'Object name' object_name
    column object_type format a15 direction "Type of object".
    Status format a10 column titled "Status".
    in the heading of column created format a20 "created."
    the LAST_DDL_TIME format a20, heading 'LAST_DDL_TIME.
    Select
    owner
    object_name
    object_type
    status
    , to_char (created, "DD_MON_YY hh24:mi:ss") created
    LAST_DDL_TIME,
    Of
    DBA_OBJECTS
    where
    object_name = upper ('& table_name') and owner = upper ('& owner');


    command prompt

    prompt -- ----------------------------------------------------------------------- ---

    Guest - table/view structure-

    prompt -- ----------------------------------------------------------------------- ---

    command prompt


    describe and owner... & table table_name

    command prompt

    prompt -- ----------------------------------------------------------------------- ---

    guest - list assigned user/subsidies-

    prompt -- ----------------------------------------------------------------------- ---

    command prompt

    set pagesize 50000
    set linesize 10000
    set verify off
    Set feedback off
    column lvl format A4 direction "Lvl".
    proprietary format of columns A14
    format column in table_name A29
    A38 dealer column format
    column privilege A10 format


    SELECT 'Role' lvl, t.table_name, t.grantee, t.owner, t.privilege
    OF dba_tab_privs t
    WHERE t.grantee IN (SELECT FROM dba_roles role WHERE = role t.grantee) and t.table_name = upper ('& table_name') and t.owner = upper ('& owner')
    UNION
    SELECT 'User' lvl t.table_name, t.grantee, t.owner, t.privilege
    OF dba_tab_privs t
    WHERE t.grantee IN (SELECT username FROM dba_users WHERE username = t.grantee) and t.table_name = upper ('& table_name') and t.owner = upper ('& owner')
    UNION
    SELECT 'Pub' lvl, t.table_name, t.grantee, t.owner, t.privilege
    OF dba_tab_privs t
    WHERE t.grantee = 'PUBLIC' and t.table_name = upper ('& table_name') and t.owner = upper ('& owner')
    ORDER BY 1, 2, 3;

    command prompt

    prompt -- ----------------------------------------------------------------------- ---

    guest - list of synonyms created.

    prompt -- ----------------------------------------------------------------------- ---

    command prompt


    proprietary format of columns A15
    synonym_name A20 column format
    A15 table_owner column format
    format column in table_name A40
    DB_link A40 column format

    Select the owner, synonym_name, table_owner, table_name, DB_link from DBA_synonyms where Table_name = upper ('& table_name') stopped by the owner;


    command prompt

    prompt -- ----------------------------------------------------------------------- ---

    guest - list index created-

    prompt -- ----------------------------------------------------------------------- ---

    command prompt

    Select
    table-name
    index_name
    index_type
    nom_tablespace
    status
    of DBA_indexes
    WHERE table_name = upper ('& table_name') and owner = upper ('& owner')
    order of table_name, index_name;


    command prompt

    prompt -- ----------------------------------------------------------------------- ---

    guest - list of constraints-

    prompt -- ----------------------------------------------------------------------- ---

    command prompt

    format column in table_name A15
    format of column cons_type A15
    cons_name A20 column format
    check_cons A25 column format
    VALIDATED A20 column format
    column status A10 format
    last_change A20 column format

    Select
    table-name
    (case constraint_type
    When 'P', then 'Primary Key '.
    When 'R' then 'Foreign Key'
    When 'C' then 'check '.
    When 'U' then 'single '.
    When 'o' then 'read only display '.
    When 'V' then 'check the view. "
    When 'H' then 'Hash expression. "
    When 'F' then 'REF column.
    When the of ' then 'additional logging.
    cons_type end)
    constraint_name cons_name
    condition_de_recherche check_cons
    status
    VALID
    last_change
    of dba_constraints
    where owner = upper ('& owner')
    and table_name = upper ('& table_name')
    order of cons_type;

    I have another script that allows to display the newly created tables (table, table names) in the last 24 hours.

    SET SERVEROUTPUT ON;

    DECLARE

    CURSOR tmp_cur IS

    SELECT master, object_name

    FROM dba_objects

    WHERE object_type in ('TABLE', 'SEE') and the owner not in ('SYS', 'SYSTEM', 'GENERAL', "XDB", "OUTLN", "SYSMAN") and last_ddl_time > sysdate - 1;

    tmp_rec tmp_cur % ROWTYPE;

    BEGIN

    FOR tmp_rec IN tmp_cur LOOP

    DBMS_OUTPUT. PUT_LINE)

    tmp_rec. Owner | ' ' || tmp_rec.object_name);

    END LOOP;

    END;

    /

    The gap of the first script (validate_table.sql) is that it can only check table one by one by manual entry, then how can I combine these two scripts, to make a scipt that can check all newly created tables (not a table) in the last 24 hours?

    I thank very you much in advance!

    Hello

    If you already know how to find the owner and all the tables created table_name recently.  One thing you can do is to change all the WHERE clauses in validate_table.sql, so instead of things like

    where object_name = upper ('& table_name') and owner = upper('&owner');

    you say

    WHERE (owner, object_name) IN

    (

    SELECT master, object_name

    FROM dba_objects

    WHERE object_type in ('TABLE', 'SEE')

    AND owner NOT IN ('SYS', 'SYSTEM', 'GENERAL', "XDB", "OUTLN", "SYSMAN")

    AND last_ddl_time > SYSDATE - 1

    )

    ;

    Here is another approach:

    Validate_table. SQL is quite handy as it is.  You may want to run this script for tables, even when you know that they are not new.  Divide into 2 scripts: one called ask_and_describe_table.sql, which looks like this:

    -Ask_and_Describe_Table.sql

    accept invites owner "Enter table owner:

    accept invites from TABLE_NAME "Enter object (table/View...) "name:"

    -You can use any name path instead of d:\some_dir below:

    @d:\some_dir\describe_table & owner, table_name

    and the other one called Describe_Table.sql, which starts like this:

    -Describe_Table.sql

    DEFINE owner = & 1

    DEFINE table_name = & 2

    column owner format a10 column 'owner '.

    ...

    and continues with the same exact content as validate_table.sql.

    Now, to write another script (I'll call it Describe_Recent_Tables.sql):

    -Describe_Recent_Tables.sql - create and run Describe_Many_Tables.sql

    -Turn OFF the devices designed to help people to read the output:

    SET ECHO OFF

    SET FEEDBACK OFF

    SET PAGESIZE 0

    VERRIFY OFF SET

    -Create a Describe_Many_Tables.sql:

    COIL d:\some_dir\describe_many_tables.sql

    SELECT ' @d:\some_dir\describe_table '

    ||      owner

    ||      '  '

    ||      object_name

    FROM dba_objects

    WHERE object_type in ('TABLE', 'SEE')

    AND owner NOT IN ('SYS', 'SYSTEM', 'GENERAL', "XDB", "OUTLN", "SYSMAN")

    AND last_ddl_time > SYSDATE - 1;

    SPOOL OFF

    -Features lighting designed to help people to read the output:

    SET ECHO ON

    SET FEEDBACK ON

    SET PAGESIZE 50

    SET VERRIFY ON

    -Describe_Many_Tables.sql performance

    @d:\some_dir\describe_many_tables

    I guess that all of your tables have standard names (for example, start with a letter, no spaces in the name,...), which don't require quotation marks.  If they could, then the same basic approach will work, but the details are a little messier.

    When you want to see the information on a single table or view, no matter how old it is, driven

    Ask_and_Describe_Table

    or, if you do not need to question the owner of the table and the name, something like

    Describe_Table SCOTT EMP

    (You can find that you really need not Ask_and_Describe_Table.sql).

    When you want to do this for all the tables created in the last 24 hours:

    Describe_Recent_Tables

  • How to kill the Batch files

    Hello

    I have three files batch for the aggregation.

    I used maxL in the batch file, and there are nearly 10 scripts of aggregation.

    Sometimes I have to kill the batch files... Can anyone please suggest how to kill the ball file while running.


    Thanks in advance.

    Depends on who do OS you run the script, you run the script and why you want to kill the script
    The script can be killed, but this does not mean that the current operation of essbase, you may need to use maxl /eas to try to kill the active session/query.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to make the button script in Illustrator?

    Dear all,

    Recently, I always use Illustrator 2 free, script text are: "joinTextFrames" & "divideTextFrame".

    but I lost a lot of step to do

    for example, click: 1. Select text-> 2. File-> 3. Script-> 4. Another script-> load a script

    Fastest way-> Ctrl + F12-> load a script

    But now I want to do is the key 2 'joinTextFrames' & 'divideTextFrame '. The same way "mode button" in stock for faster work.

    How to make or solution to make? I really need it for my work.

    Thanks for your help.

    Save your scripts folder in the scripts, like that they'll show in the file-> Scripts Menu. Then, save the two actions to run each script, each gives a shortcut key (i.e. & F3 F2) or run the Mode button if you want to.

    Note that you need to re - register the action every time that you restart illustrator.

  • How to pass the encrypted script Python DB pwd

    Hello

    I'm trying to set up a domain using the python script.

    The script looks as follows:

    CD (' JDBCSystemResource/MYConnectionPool/JdbcResource/MyConnectionPool')
    Create ('myJdbcDriverParams', 'JDBCDriverParams')
    CD (' JDBCDriverParams/NO_NAME_0')
    Set('DriverName','oracle.) JDBC. OracleDriver')
    Set ('URL', OS.environ ['DATASERVER_DB_URL'])
    together ('PasswordEncrypted', "user1")

    I hard code the password as "user1" in the script. While I want to encode the password in the script as it might be different in the production environment.

    I would like to encrypt the pwd and put in a file and reference the file here in the script. Reference this file can be stored in a variable env and then passed to the script as follows:

    Set ('PasswordEncrypted', os.environ ['DATASERVER_DB_PWD'])

    Can someone help me to find out how to encrypt the pwd and how I pass to the python script.

    Thank you
    Shalini

    Hello

    NOTE: If you enter a wrong password encrypted in the WLST script.. then it won't be visible in the AdminConsole...

    I understood what mistake you made. You could have the script WLST My pasted into your Machine directly and did not replace the pssword Encrypted (or maybe a few got wrong characters included in encrypted password by replacing in the WLST script ) with your own encrypted at heart... This is why you don't see any password in the password TextField... I m able to reproduce the same thing at my end... .with the same error.

    Please try this...

    Step 1). Open a Shell prompt...

    Step 2). Move inside your root directory of the domain, and then run * "setDomainEnv.sh" *.
    Example:
    C:\bea\user_projects\domains\base_domain\bin

    Step 3). Since your domain root directory, run the following command:

    Example:
    C:\bea\user_projects\domains\base_domain>Java weblogic.security.Encrypt PBPUBLIC
    4NT9WiBG7MXYBiEteLogvA {3DES} is

    Step 4). Now, change this value encrypted in the My WLST script...

    Step5). Now, run the WLST Script to create the data source.

    .
    .
    Thank you
    Jay SenSharma

  • How to write the Java script to reference the 1st page 2nd page text field?

    Hello

    I'm developing an interactive form of VISITOR info with webdynpro ABAP, his as well as 2 pages. Their hierarchy is,

    VISITOR_form
        |
        |
        |------Page_1
        |            |
        |            |
        |            |------Text_Field_A_1
        |            |
        |            |------Text_Field_A_2
        |
        |------Page_2
                     |
                     |
                     |------Text_Field_B_1
                     |
                     |------Text_Field_B_2
    

    Now, I chose the 'Text_Field_B_1' of page_2 and write the script Java, my requirement is; If Page_1's ' Text_Field_A_2' is set to 'Value_ABCD', THEN the 'Text_Field_B_1' of page_2 should be 'readOnly '. Pls let me know WHT is the Java script for this requirement?

    If (xfa.event.newText == "ABCD)."
    {

    VISITOR_form. Page_2.Text_FieldB_1.access = "readOnly";

    }

    Put the script on the Text_FieldA_2 change event

  • Change the LV version currently active in the batch script

    Hello

    I use two different applications on my computer, and one of them should run in LV 2011, this in LV 2012. The two versions are installed and it works fine until I start the correct version of LV manually before you start the application (start and end of the required version of LV in C:\Program Files (x 86) \National Instruments\... before starting my request).

    I want to do this automatically in a command script, so basically I want to do the following:

    * Check which version of LV is currently active (last LV start version)

    * If the currently active version of LV is NOT required: change to the required version of LV (by starting LV and close or preferably do differently if someone could tell me how)

    * If the currently active version of LV is required: do nothing

    There are two problems I couldn't solve so far:

    * How to get the LV version currently active (I checked the windows registry, but I see that my installed versions of LV, and not one that is currently active)

    * How can I close LV with a batch script (or how to change the version of the currently active LV without opening and closing)

    Thanks in advance,

    Tobias

    PS: I did the same for the different versions of TestStand, by reading the TestStand system and if requuired environment variable change the version of TestStand via the command-line of the TS Version selector. It works fine, but there is no system environment variable that indicates the currently active version of LV.

    OK, this is a very informal Tip:

    In the registry (regedit), you will find the key 'HKEY_CLASSES_ROOT\LabVIEW.Application\CLSID '. This default key should contain some weird ID information.

    If you search for this key, you will find an entry for the key in the "HKEY_CLASSES_ROOT CLSID" section.

    If you have several versions of installed LV, there must be a key in the entry which will give you the path to the active version of NV. don't forget: this is the version that you have opened up to the last successfully!

    Please note that keys can change from system to System. Also different versions of LV can use different keys like "routing information" the way of the real LabVIEW.exe.

    hope this helps,

    Norbert

  • regenerate the batch script

    Is it possible to regenerate scenarios in the batch?

    http://odiexperts.com/regenerate-ODI-objects-using-odigenerateallscen
    http://odiexperts.com/generate-multiple-scenarios

  • How to report the advertising Chinese on the AppStore

    Recently, there are many Chinese like to advertise on the AppStore (in the Chinese section). Here is the sample application.

    These Chinese advertisers publishes their ads of almost any application (if the application is popular). And they usually announce an application called «WeChat "(微信).» It extremely annoys people again!       How can I report them?

    Howdy MasterChief

    I had to look it up!

    Add a comment or leave a note in the iTunes Store or App Store - Apple Support

    • You have to find one of these 'elements' in iTunes Store in iTunes App - device iOS or Mac or PC (my example below)
    • Choose the item
    • Choose 'add a comment '.
    • attend the bottom right and choose > "report a problem".

  • How to report the thread in the wrong space?

    Hello, where can I report that a thread is in the wrong space or subspace?

    Is this the correct subspace or do I have to write to any host?

    Thanks to advice.

    On the wire, use the "report abuse" in the Actions panel and indicate that the thread is in the wrong place (and if you know where to go it would be useful that the moderators cannot know everything).

Maybe you are looking for

  • Home page search is not working / not Possible to restore the previous Session

    After the last update (version 29), the home page of default Firefox search bar has been completely non-functional. If I hit enter or press search, nothing happens. Another (possibly related) problem is that the button 'Restore previous Session' is n

  • Ereignissuche tiara 2015

    Hello dear members of the Forum NI, Ein ich get just selbst script, which Zeitpunkte herausfinden soll, wo Sensor_X, Y, Z values aufzeigt certain (Bsp: F_01 > 10; relF_01 > 80;) B_02 = 0).Habe are first mit der Funktion: 'Find' bzw. "ChnFind" tried,

  • HP M1212nf Mfp printer installed via USB Port

    I checked all my software and hardware, but when I install the printer using the printer installation disc works. But when I turned my computer off and restart the computer, the printer does not print. The printer indicates a default printer and the

  • Backup to a network

    I try to use Windows Backup and Restore Center to back up files on a server on our network home. The computer sees the server and can read, write, and delete files in the shared folder on the disc. When I try to use the Windows backup software I get

  • BlackBerry Smartphones Vauge messaging problem! I mean the difficulties of reconciliation of password... I think so.

    Hello and a preemtive thanks for your help Sunday. Had problems since I changed my yahoo email password. BB Pearl 8110 cannot receive or send emails. Request password passed to the device. Password or the United Nations are not valid. Imagine the Uni