Home QRYTSCIP – Script Utility to Query the Current Session’s Client IP address

QRYTSCIP – Script Utility to Query the Current Session’s Client IP address

0
0

QRYTSCIP is a command-line tool for Terminal Servers to query the current session’s client IP address.

This utility was written for the purpose of allowing one login script to process specific commands for specific IP addresses or IP segments.

This utility is FREEWARE and was written by Warren Simondson of Ctrl-Alt-Del IT Consultancy, Australia. http://www.ctrl-alt-del.com.au/

Usage:

QRYTSCIP [IP_part1] [IP_part2] [IP_part3] [IP_part4]

IP_part1 – identifies first number in the IP address

IP_part2 – identifies second number in the IP address

IP_part3 – identifies third number in the IP address

IP_part4 – identifies fourth number in the IP address

E.G. QRYTSCIP 192 168 1 119

This command will check to see if the client ip address of a session equals 192.168.1.119

The ERRORLEVEL return code shows if the client ip does match the specified IP Address.

QRYTSCIP also works for part IP addresses.

E.G. QRYTSCIP 192 168 1

This command will check to see if the client ip address

of a session is in the segment 192.168.1.xxx.

Example Script:

usrlogon.cmd

————

@ECHO OFF

:stage1

QRYTSCIP 192 168 5 45

IF ERRORLEVEL 1 goto stage2

rem successfully matched

echo This is the correct client ip.

echo put other commands here for this ip address.

goto end

:stage2

QRYTSCIP 192 168 2

IF ERRORLEVEL 1 goto end

rem successfully matched

echo This is the correct client ip segment.

echo All clients using 192.168.2.xxx will be processed.

echo put other commands here for this app.

:end

echo put general logon commands here

Click to download the QRYTSCIP utility

Categories:
DABCC DABCC.com, the world leader in sharing the finest Virtualization & Cloud news and support resources. #Citrix, #VMware, #Microsoft, #Mobility and much more! Brought to you by @douglasabrown & team!

Featured Resources:

Related Articles:

| LATEST FEATURED RESOURCES

White Papers

    Application Lifecycle Management with Stratusphere UX – White Paper

    Enterprises today are faced with many challenges, and among those at the top of the list is the struggle surrounding the design, deployment, management and operations that support desktop applications. The demand for applications is increasing at an exponential rate, and organizations are being forced to consider platforms beyond physical, virtual and cloud-based environments. Users […]

    Downloads

      Download Commvault VM Backup and Recovery: end-to-end VM backup, recovery and cloud management

      Commvault’s ability to provide end-to-end VM backup, recovery and cloud management creates a significantly better way to build, protect and optimize VMs throughout their lifecycle. Our best-in-class software for VM backup, recovery and cloud management delivers a number of significant benefits, including: VM recovery with live recovery options; backup to and in the cloud; custom-fit […]

      On-Demand Webinars

        What’s Going on in EUC Printing – A Technical Deep Dive!

        The IGEL Community and ThinPrint invite you to watch the following technical deep dive webinar. The agenda is to technically bring you up to speed on what’s going on in the EUC Printing space today along with a deep dive into new methods, technologies, printing scenarios and a discussion on why printing still matters. You […]

        Latest Videos

          Views All IT News on DABCC.com
          Views All IT Videos on DABCC.com
          Win big $$, visit ITBaller.com for more info!

          Visit Our Sponsors

          Close