Posts

temp

$Path = "C:\Temp\DemoData" New-Item -ItemType Directory -Path $Path -Force $FileSizeMB = 100 $NumberOfFiles = 20 for ($i = 1; $i -le $NumberOfFiles; $i++) {     $FilePath = "$Path\dummy_$i.tmp"     $stream = [System.IO.File]::Create($FilePath)     $stream.SetLength($FileSizeMB * 1MB)     $stream.Close() } Write-Host "Created 2 GB dummy data successfully"

Testing

AI Force – Phase 0 Pilot Use-Case Demonstration Client Presentation – Speaker Notes Date: 11 November 2026 Slide 1 – Introduction: Pilot Use-Case Demonstration Good morning everyone, and thank you for joining today's session. Today, we will be showcasing the Phase 0 pilot initiatives that we have identified and developed as part of our automation journey using AI Force and RunbookAI. The objective of this pilot is to demonstrate how we can take some of the repetitive infrastructure operations activities that are currently handled manually and move them towards standardized, automated and, wherever applicable, self-healing workflows. We have deliberately started with a few focused use cases where the operational process is relatively well understood, the execution steps are documented, and the potential business value is measurable. Rather than just discussing the solution theoretically, we will also walk you through actual executions on the orchestrator platform and show h...

esxcli random

 esxcli network vswitch standard policy failover set  --active-uplinks=vmnic0,vmnic1 -v vSwitch0 esxcli network vswitch standard portgroup add --portgroup-name=Prod-789  --vswitch-name=vSwitch0 esxcli network vswitch standard portgroup add --portgroup-name=Prod-787  --vswitch-name=vSwitch0 esxcli network vswitch standard portgroup set --portgroup-name=Prod-789 --vlan-id=789 esxcli network vswitch standard portgroup set --portgroup-name=Prod-787 --vlan-id=787 esxcli network vswitch standard portgroup add --portgroup-name=VMotion1 --vswitch-name=vSwitch0 esxcli network vswitch standard portgroup set --portgroup-name=VMotion1 --vlan-id=722 esxcli network ip interface add --interface-name=vmk1 --portgroup-name=VMotion1 esxcli network ip interface ipv4 set --interface-name=vmk1 --ipv4=10.232.x.x --netmask=255.255.254.0 --type=static vim-cmd hostsvc/vmotion/vnic_set vmk1 esxcli network ip dns search add --domain=corp.test.com esxcli network ip dns server add --server=10.19...

govc random

 #!/bin/sh export GOVC_URL='<VC URL>' export GOVC_USERNAME='<USERNAME>' export GOVC_PASSWORD='<PASSWORD>' export GOVC_INSECURE=1 export GOVC_DATACENTER=<DATACENTER> export no_proxy=IPs & DOMAIN date=`echo "'"$(date +%F)"'"` ################# Scan for ESXi / HW Data ####################################### for cluster in `govc ls /OpenShift/host/ | grep -v OLD | grep -v Maint|awk -F '/' '{print $4}'` do         for host in `govc ls /OpenShift/host/$cluster | grep -v Resources |awk -F '/' '{print $5}'`         do                 vendor=`echo "'"$(govc host.info /OpenShift/host/$cluster/$host | grep Manufacturer: |awk '{print $2}')"'"`                 memory=`expr  $(govc host.info /OpenShift/host/$cluster/$host | grep Memory:|awk -F 'MB' '{print $1}'|awk '{print $2}') / 1024`                 cpu...

Random One Liners

 /usr/sbin/rear -v mkbackup nfs://nas_name/linux_bkp/images  in  /etc/rear/local.conf blockdev --rereadpt /dev/sdb pvresize /dev/sdb free && sync && echo 3 > /proc/sys/vm/drop_caches && free echo 1 > /proc/sys/vm/drop_caches  echo 2 > /proc/sys/vm/drop_caches echo 3 > /proc/sys/vm/drop_caches date --set="$(ssh user@server date)" echo "body" | mailx -s "subject" test@hello.com for i in /var/spool/postfix/*;do echo $i; find $i |wc -l; done find /var/Secured_History -size  0 -print0 |xargs -0 rm zoneadm list -cv find / \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o -fstype btrfs \) -exec setfattr -x security.selinux {} \; arp -a|grep SP timeout 1 bash -c 'cat < /dev/null > /dev/tcp/test_server/37410' append fastboot to kernel line to skip fsck ss -ln src :22 alternatives --display java find / -size +1000 -xdev -exec du -sh {} \;|sort -nk1 from jump to remote server = ssh test_server date -s @`( date -u...

F5 Health to postgrsql

 #!/bin/sh for cluster in `cat f5inventory` do clusterid=`echo $cluster |awk -F [/:-]  '{print $4}'` url=`echo https://$clusterid-master.test.com:8443/healthz` output=`curl -k  $url` if [ $output == ok ] then         stat=`echo "'"200"'"`         link=`echo "'"$url"'"`         PGPASSWORD=postgres psql -U postgres -d ocpinfra -h test_server -p 5432  -c "UPDATE f5 SET Status = $stat WHERE F5_URL=$link;" else         stat=`echo "'"400"'"`         link=`echo "'"$url"'"`         PGPASSWORD=postgres psql -U postgres -d ocpinfra -h test_server -p 5432  -c "UPDATE f5 SET Status = $stat WHERE F5_URL=$link;" fi done

Jenkins Job Cleanup

 def jobName = "Test Removal Job" def job = Jenkins.instance.getItem(jobName) job.getBuilds().each { it.delete() } job.nextBuildNumber = 1 job.save()