Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › The simple PowerShell project!
New Posts  All Forums:Forum Nav:

The simple PowerShell project!

post #1 of 2
Thread Starter 
Quote:
  • Display free hard drive space
  • Directory search (based on entire hard drive letter)
  • Ping an IP or Host 4 times
  • Ping an array of IPs
  • Quick event log search, display X amount of logs (Hint use -newest)
  • Basic System Information, a utility to display 3 WMI queries, BIOs System Information, Processor Information and Computersystem Information
  • Final objective is to create your own utility of your specifications..
So the one I'm curious about is for this "Ping an array of IP's", Now I know I can just use "ping www.google.com" but how would I go about allowing me to enter 3 more addresses and then displaying the total 4 when I've entered all the IP's?

I know a loop function is used in there somewhere!
Cashcow
(13 items)
 
   
CPUMotherboardGraphicsRAM
Phenom II 955 | C3 | 4GHz MSI | 790FX | GD70 MSI | GTX570 1.25GB G.Skill | Ripjaws | 4GB | 1600MHz 
Hard DriveOptical DriveOSMonitor
60GB Corsair F3 | Caviar Black1TB Lite-On | Blu-Ray Windows | 7 | Ultimate Sony Bravia | EX500 46" 
KeyboardPowerCaseMouse
Razer Lycosa Corsair | TX650W Corsair Obsidian | 800D Razer Death Adder 
Mouse Pad
Razer Goliathus 
CPUGraphicsRAMHard Drive
1.2GHz Exynos SoC Mali-400 MP 1GB 16GB Flash storage 
OSMonitorPower
Android 3.2.7 (CriskelloROM Variant)  4.3" Super AMOLED+ Display 1650ma Battery 
CPUGraphicsRAMHard Drive
i5-2557M Dual-core 1.7ghz Intel HD3000 386mb 4G 1333mhz 128gb Intel SSD 
OSMonitorKeyboardCase
Mac OSX Lion 13.3" 1440x900 LED Backlit  Unibody  
  hide details  
Reply
Cashcow
(13 items)
 
   
CPUMotherboardGraphicsRAM
Phenom II 955 | C3 | 4GHz MSI | 790FX | GD70 MSI | GTX570 1.25GB G.Skill | Ripjaws | 4GB | 1600MHz 
Hard DriveOptical DriveOSMonitor
60GB Corsair F3 | Caviar Black1TB Lite-On | Blu-Ray Windows | 7 | Ultimate Sony Bravia | EX500 46" 
KeyboardPowerCaseMouse
Razer Lycosa Corsair | TX650W Corsair Obsidian | 800D Razer Death Adder 
Mouse Pad
Razer Goliathus 
CPUGraphicsRAMHard Drive
1.2GHz Exynos SoC Mali-400 MP 1GB 16GB Flash storage 
OSMonitorPower
Android 3.2.7 (CriskelloROM Variant)  4.3" Super AMOLED+ Display 1650ma Battery 
CPUGraphicsRAMHard Drive
i5-2557M Dual-core 1.7ghz Intel HD3000 386mb 4G 1333mhz 128gb Intel SSD 
OSMonitorKeyboardCase
Mac OSX Lion 13.3" 1440x900 LED Backlit  Unibody  
  hide details  
Reply
post #2 of 2
I don't know PowerShell, but it sounds pretty easy. Just ask the user for x addresses/IPs, store them in an array of size x.

Then loop through the array and ping the given IP. In a Java-like syntax it'd look like this:

for (int i = 0; i < x; i++)
ping addresses[x];
Logic
(14 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600K ASRock P67 Extreme4 Gen3 ASUS HD 7950 TWIN FROZR 3GB Corsair Vengeance 16GB DDR3-1600 
Hard DriveCoolingOSMonitor
Intel 330 120GB SSD + Spinpoint F3 1TB Corsair H60 Windows 7 Ultimate x64 Samsung 24.6" P2570HD 
KeyboardPowerCaseMouse
Filco Ninja Majestouch-2 Tenkeyless Antec EarthWatts 650W Corsair 600T Silver Logitech G500 
  hide details  
Reply
Logic
(14 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600K ASRock P67 Extreme4 Gen3 ASUS HD 7950 TWIN FROZR 3GB Corsair Vengeance 16GB DDR3-1600 
Hard DriveCoolingOSMonitor
Intel 330 120GB SSD + Spinpoint F3 1TB Corsair H60 Windows 7 Ultimate x64 Samsung 24.6" P2570HD 
KeyboardPowerCaseMouse
Filco Ninja Majestouch-2 Tenkeyless Antec EarthWatts 650W Corsair 600T Silver Logitech G500 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › The simple PowerShell project!