Maximize your protection, eliminate business risks.
Optimize and modernize with cloud transformation.
Empower your people to work securely from anywhere.
Let us handle IT so you can focus on growing your business.
Get multichannel 24/7/365 expert end-user support.
Protect, detect, and respond—Dataprise keeps your business secure.
Maximize uptime with with industry-leading DRaaS.
Swiftly mitigate cyber threats and restore security.
Improve efficiency, productivity and outcomes with cloud.
Ensure all mobile devices, everywhere, are secure.
Gain a competitive edge with strategic IT solutions.
This battle-tested checklist enables your team to swiftly initiate a ransomware response.
IT for businesses of all sizes, in any industry.
Empower institution growth with custom IT solutions.
Ensure your firm is always in compliance.
Improve patient care and staff morale.
Deal with pressing legal matters, not IT.
Keep up with the evolving digital landscape.
Focus on your mission by outsourcing IT.
Accelerate PE client deals and secure data.
Empower Your Municipality with Secure, Reliable IT Services
Execute initiatives and develop IT strategies.
Get the latest industry insights and trends.
Join us at events in person and online.
Hear from clients and learn more about strategic IT.
See how Dataprise can make IT your greatest asset.
Get informative technical resources from IT experts.
Stay on stop of emerging cybersecurity threats.
Discover the key areas of DR your organization needs to address to ensure downtime is minimized.
Gain a strategic asset by bringing harmony to IT.
Ensure 24/7 support and security with dedicated teams.
Drive business forward by partnering with Dataprise.
Meet our one-of-a-kind leadership team.
Discover the recognition Dataprise has earned.
Help us help businesses with strategic IT.
Grow through acquisition and partnership with Dataprise.
Embracing different perspectives and backgrounds.
Find a Dataprise location near you.
Dataprise is committed to empowering more women to consider a career in technology.
Explore our trusted partnerships with leading tech innovators.
Posts
By: Dataprise
Table of content
Many times I am working on a network where I need to either flush out an ARP table or just see if any hosts respond. So from a Windows system we go to the command prompt and use the for command to setup a basic for loop (like back in the programming days). If you want to see all the options for the “for” command use the:
for /?
Our example is going to the sequence of numbers option “/L”. We are going to need to define 5 things to get our loop to work.
1) Variable: We need to define a variable that will be assigned the values as we loop through them.
2) Start: What number is the sequence is starting at. We will be using 1.
3) Step: What is going to be added to the sequence with each iteration.
4) End: What is the last sequence in the iteration.
5) Command: What command to run, and all its parameters to use
So to put it in context it would look like:
FOR /L %variable IN (start,step,end) DO command [command-parameters]
In my example I am using:
1) Variable: i
2) Start: 1
3) Step: 1
4) End: 254
5) Command: ping 192.168.1 -n 1
Put all together it is:
for /L %i IN (1,1,254) DO ping 192.168.1.%i -n 1
It will walk the whole local network block and ping each host one time. When it runs Below is the output.
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=287ms TTL=255
Ping statistics for 192.168.1.1:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 287ms, Maximum = 287ms, Average = 287ms
Pinging 192.168.1.2 with 32 bytes of data:
Request timed out.
Ping statistics for 192.168.1.2:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
Pinging 192.168.1.3 with 32 bytes of data:
Ping statistics for 192.168.1.3:
.
Pinging 192.168.1.252 with 32 bytes of data:
Reply from 192.168.1.252: bytes=32 time=244ms TTL=63
Ping statistics for 192.168.1.252:
Minimum = 244ms, Maximum = 244ms, Average = 244ms
Pinging 192.168.1.253 with 32 bytes of data:
Ping statistics for 192.168.1.253:
Pinging 192.168.1.254 with 32 bytes of data:
Ping statistics for 192.168.1.254:
Jason Howe, PEI
INSIGHTS
Subscribe to our blog to learn about the latest IT trends and technology best practices.