Some tips for me and other

Powershell + CSS in the tables

Not all CSS style instructions work in Outlook. There some tricks to colorize tables: Zebra in the table $Body = $Body -replace ‘(?.)\r\n(?.)’,’${first}${second}’ Replace in the table started from 3 to red and less to green $Body = $Body -replace ‘(?[3-9][0-9]{1,})(?.)’,’${first}${second}’ -replace ‘(?[1-2][0-9]{1,})(?.)’,’${first}${second}’ Simple replace $Body = $Body -replace <td>1</td>,<td bgcolor=#333>1</td>

Exchange 2019 + renew the certificate

You cannot renew the certificate via WebGUI, Powershell only. We will use Godaddy and we have the existing certificate which we will renew. Get the renewed certificate from Godaddy. Run IIS management console on the first Exchange server. Go to Server certificates and click Complete certificate request. Choose the certificate from Godaddy. It will appear […]

Test SMTP NTLM AUTH with TELNET + hint

The process: Notice: the base64 linux and windows encoding are different. The command to encode in powershell: [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(“password”)) hint: If you plan to bring a string encoded in Powershell into Linux then do the following, first encode in Powershell Then in Linux do the following:

Ubuntu + Create a user with password from the parameter

Ubuntu + Script to extend a disk

#!/bin/bash fdisk /dev/sda << FDISK_CMDS n w FDISK_CMDS partprobe /dev/sda a=$(vgs | awk ‘ NR==2 {print $1;}’) vgextend “$a” /dev/sda3 b=$(vgdisplay | awk ‘ NR==17 {print $3;}’) lvextend -L +”$b” /dev/$a/ubuntu-lv resize2fs /dev/$a/ubuntu-lv Usefull link: Manual:

Mcedit + color scheme

Can be configured in the file ~/.config/mc/ini

ESXi + Modify RAID0 to RAID1

/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 show detail /opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 ld 3 add drives=allunassigned /opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 ld 3 modify raid=1

ESXi 6.7 + HP Array Utility

Show controller config/opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show config Show controller status/opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show status Show controller info/opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show detail Show controller info by slot/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 show detail Controller re-scan/opt/smartstorageadmin/ssacli/bin/ssacli rescan Physical disks status/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 pd all show status Physical disk status full/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 pd all show detail Logical disks status/opt/smartstorageadmin/ssacli/bin/ssacli […]

Test HDD speed + Linux

ESXi 5.5 to 6.7 + no datastores

Link: Connect to the ESXi host with an SSH session and root credentials To list the volumes detected as snapshots, run this command: esxcli storage vmfs snapshot listYou see output similar to: 49d22e2e-996a0dea-b555-001f2960aed8Volume Name: VMFS_1VMFS UUID: 49d22e2e-996a0dea-b555-001f2960aed8Can mount: trueReason for un-mountability:Can resignature: trueReason for non-resignaturability:Unresolved Extent Count: 1 To mount a snapshot/replica LUN that […]

Previous Posts Next posts