Torx's Mind
Random IT stuff that I have picked up here and there.
Sunday, December 31, 2023
Windows Firewall rules for Fortinet SSO Collector
Thursday, December 28, 2023
Wednesday, September 15, 2021
Grab a NIC IP information and dynamically create a reset script
I had a request to figure out how to record a NIC's IP information and make it easy to put the config back if required. the result us a run-able $outfile PowerShell script to reset the settings.
Friday, April 16, 2021
Native Windows 10 packet Sniffer PKTMON
I had to troubleshoot connectivity issues from a Window 10 machine, and really did not want to install Wireshark. Then I remember reading this document for the built in sniffer: pktmon | Microsoft Docs
- Change directory to
where you want the results to be saved (I.E. c:\temp)
- Add Filters for the IP
you want to monitor for
- pktmon filter add -i
8.8.8.8
- pktmon filter add -i 9.9.9.9
- Start pktmon
- pktmon start –etw
(this will send to PktMon.etl file only)
- pktmon start --etw -l
real-time (Will send to PktMon.etl file and the screen)
- Generate the traffic
- Stop pktmon
- pktmon stop
The native file PktMon.etl can only be read by Microsoft’s
NetMon. If you have WireShark installed you can run this command to
convert it:
- pktmon pcapng pktmon.etl -o log.pcapng
Also for reference, the on screen verbose (-l real-time) of
opening nslookup and connecting to 8.8.8.8 would look like this:
There are other options in the linked doc but to get a quick
view of traffic, not bad…. Enjoy!
Friday, April 09, 2021
Get all active directory users properties
Wednesday, August 26, 2020
Rename Files to a random name
I had a bunch of photos that I wanted to randomize on a photo frame. The frame processes photos alphabetically by file name. Since the original filename had the date / time the picture was taken, meant there was no randomness to what was displayed.
I wrote this to change the filenames to a random number.