All posts containing scripts and patterns that can not be categorized.

[Other] Start DevOps Tools From Command line

Some commands I regularly use to start tools from the command line when I need them to start with elevated privileges.

My Frequently Used CLI Commands / Admin Tools (QuickRef)Description
dsa.msc / adsiedit.msc / virtmgmt.msc Active Directory Users & Computers / ADSI Edit / Hyper-V Manager
start-process powershell -verb runasStart PowerShell with Elevated Privileges
rundll32 sysdm.cpl,EditEnvironmentVariablesEdit system environment variables
cacls “C:\Path\To\File.TXT” /E /G username@example.com:CQuick way to add write permission to a filesystem resource
mvn clean package -DskipTestsMavin compile (Java) code and create local package
mvn test -Dtest=JavaClassTest#specificTestRun a specific unit test from the command line
java -Djavax.net.debug=ssl:handshake -jar target/packagename-1.0.0-SNAPSHOT.jarStart package with TLS handshake debugging enabled
oc create secret generic gateway1 –from-file=server.p12Create an OpenShift secret from the command line
touch -t 202301251415.00 FilenameForce file timestamp to a specific datetime
oc get pods | grep Evicted | awk ‘{print $1}’ | xargs oc delete podDelete evicted pods from current OpenShift project

Netwerk IPv4 Subnetting

max aantal subnetten: 2^n (-2) // n = aantal masked bits *subnet* mask
max aantal hosts in subnet = 2^n -2 // n = ongemaskeerde bits

next multiple of 8 = next mult. of 8 greater or eq. to CIDR netmask not.
interesting value = (next multiple of 8) / 8

incremental value = 2^ (next multiple of 8 - CIDR netmask notation)

incremental value = 2^(32-27) = 2^5 = 32
interesting value = 32 / 8 = 4
netwerkadressen:,,, enz.
broadcastadressen:,,, enz.
broadcast (192.168.10.(64-1))

incremental value: 2^(16-14) = 2^2 = 4
interesting value = 16 / 8 = 2
broadcast: ( 10.(8.0.0-1)