Skip to content

Repository files navigation

hatools

Happy Admin Tools

Table of contents


Powershell >= 7.2

Pinger

Easy ping with timestamp, log, email notifications, etc.

Screenshot

PingonatorGUI

Pinger command syntax

.\pinger.ps1-destinationip_or_name [-waitcount] [-alarm] [-email] [-help]

OptionsExplanationDefault value
-destinationDestination to ping
-waitcountWait between pings in seconds1
-logWrite to CSV log file (to %TEMP%)False
-alarmIf -log is enabled than save log file and create new at HH:mm (one per day). Syntax: 08:05 or 8:05False
-emailSend email with log file at alarm time (-log and -alarm must be enabled)False
-helpHelp screen. No options at all to have the same.False

Keyboard shortcuts

Keyboard shortcutExplanation
DDestination
HHelp
PPause
SStatistics
WWait time between pings
Ctrl + C or QQuit

OUI macro for Notepad++

You can use ready oui.txt from this repository or make your own fresh OUI (Organizationally Unique Identifier) text file with Notepad++ for hash table:

  1. Open oui_macro.txt and copy/paste all from it to %AppData%\Notepad++\shortcuts.xml

  2. Download http://standards-oui.ieee.org/oui/oui.csv

  3. Open downloaded oui.csv in Notepad++. You see somethig like this:

    ...
    MA-L,94DC4E,"AEV, spol. s r. o.",Jozky Silneho 2783/9 Kromeriz CZ 76701 MA-L,1442FC,Texas Instruments,12500 TI Blvd Dallas TX US 75243 ...
    
  4. Run from "Macro" menu "oui_macro"

  5. After it you will see:

    ...
    94DC4E=AEV
    1442FC=Texas Instruments
    ...
    
  6. Delete strange dublicates (delete and leave only one):

    • 080030
    • 0001C8
  7. Save file as oui.txt

  8. Example of using on Powershell
    $oui = Get-Content -raw .\oui.txt | ConvertFrom-StringData
    $MAC=("cc-b1-1a-5b-c1-b9").ToUpper()
    $vendor = $oui[$MAC.replace(':', '').replace('-', '')[0..5] -join '']
    Remove-Variable $oui
    $vendor
    Samsung Electronics Co.
    
  9. Macro actions
    Replace every pair of lines (set radio button 'Regular expression')
    MA-L,
    <nothing!>
    ([0-9a-fA-F]{6},)("(.*?)")((,".*")|(.*))
    \1\2
    ^([0-9a-fA-F]{6}),
    "\1",
    ^("[0-9a-fA-F]{6}",)(.*?)$
    \1\2"
    ^("[0-9a-fA-F]{6}",)([^"](.*?))$
    \1"\2
    ","
    =
    "
    <nothing!>
    ^(.*=[^,]*)(.*)
    \1
    

Table of contents


Powershell >= 7.2

WOL

Wake-on-LAN

wol command syntax

.\wol.ps1-macmac_address [-ipip_address] [-help]

OptionsExplanationDefault value
-macMAC address to wake up
-ipIP address to check ping after wake up
-helpHelp screen. No options at all to have the same.False

Powershell >= 7.2

copy_folders_to_one

Copy files from one directory (with other directories) to only one.

copy_folders_to_one command syntax

.\copy_folders_to_one.ps1-sourcesource_path-destinationdestination_path [-include extention(s)] [-realname] [-help]

OptionsExplanationDefault value
-sourceSource path
-destinationDestination path
-includeCopy only file with this extension(s)
-realnameDidn't rename filenamesFalse
-helpHelp screen. No options at all to have the same.False

Up to Table of contents


Powershell >= 7.2

now.cmd

Date-time converter

Convert "26 апреля 2022 г. 9:29:42" to "20220426_092942"


About

Happy Admin Tools

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages