Note book to help you and me remember some tricks

Category windows

Detect Active Directory users password expiration and send a reminder email

The following code must be executed as administrator on your active directory server: https://github.com/nfourniol/scripts/tree/main/windows/activeDirectory

Samba vs SMB vs CIFS vs NFS

CIFS, SMB and NFS are protocols. And Samba is an implementation of SMB protocol on Linux OS. SMB (Server Message Block) SMB is a network protocol created by IBM for the share of resources (files and printers) in local networks…. Continue Reading →

How to empty a file with cmd or powershell? (equivalent of linux: cat /dev/null > pathtofile)

cmd version: The file is now 0 byte size, and occupies 0 byte on disk. powershell version: In this case, the properties of the file show us it’s now 2 bytes size then not completely empty. And the file uses… Continue Reading →

Equivalent of Linux tail -f inside windows powershell

-Wait signifies wait for new logs and display it -Tail 10 signifies display the last 10 lines from <my_log_file>

© 2024 Software engineer >> Sysadmin >> Devops >> SRE

Up ↑