Hodžův blog

20 Dub

HowTo: PowerShell Full Command History

Get-Content (Get-PSReadlineOption).HistorySavePath

28 Úno

VMware ESXI 7 and Intel NVMe SSD – Can’t add datastore

After a clean installation of VMware ESXi 7.0, I saw an NVMe disk (Intel DC P4600 4TB) in the system, but the datastore could not be added.
I solved the problem quickly as follows:

1. List unresolved snapshots or replica volumes.
# esxcli storage vmfs snapshot list
621cdcb9-053ddbab-e0a7-ac162d6f2e80
Volume Name: NVME-Intel
VMFS UUID: 621cdcb9-053ddbab-e0a7-ac162d6f2e80
Can mount: true
Reason for un-mountability:
Can resignature: true
Reason for non-resignaturability:
Unresolved Extent Count: 1

2. Resignature snapshot
# esxcli storage vmfs snapshot resignature --volume-label=NVME-Intel

Now it’s possible to add a datastore in the standard way…

Also don’t forget to install the Intel® Memory and Storage Tool CLI.

Common information about the disc:
# /opt/intel/intelmas/intelmas show -intelssd 0
- 0 Intel SSD DC P4600 Series PHLE729000X14P0KGN -
Bootloader : 0110
Capacity : 3726.02 GB
DevicePath : nvmeMgmt-nvmhba0
DeviceStatus : Healthy
Firmware : QDV10150
FirmwareUpdateAvailable : Firmware=QDV101D1 Bootloader=QB1B0136
Index : 0
MaximumLBA : 7814037167
ModelNumber : INTEL SSDPEDKE040T7
NamespaceId : 1
PercentOverProvisioned : 100.00
ProductFamily : Intel SSD DC P4600 Series
SMARTEnabled : True
SectorDataSize : 512
SerialNumber : PHLE729000X14P0KGN

S.M.A.R.T information:
/opt/intel/intelmas/intelmas show -nvmelog SmartHealthInfo -intelssd 0
- PHLE729000X14P0KGN -
- NVMeLog SMART and Health Information -
Volatile memory backup device has failed : False
Temperature has exceeded a critical threshold : False
Temperature - Celsius : 21
Media is in a read-only mode : False
Power On Hours : 0x5948
Power Cycles : 0x07
Number of Error Info Log Entries : 0x0
Controller Busy Time : 0x483A
Available Spare Space has fallen below the threshold : False
Percentage Used : 5
Critical Warnings : 0
Data Units Read : 0x4447F480
Available Spare Threshold Percentage : 10
Data Units Written : 0x81CC91A9
Unsafe Shutdowns : 0x03
Host Write Commands : 0x09DF7D8CD4
Device reliability has degraded : False
Available Spare Normalized percentage of the remaining spare capacity available : 99
Media Errors : 0x0
Host Read Commands : 0x0277FA1B17

Disk firmware update:
# /opt/intel/intelmas/intelmas load -intelssd 0

30 Zář

How to find: Exchange Administration Center URL

In Exchange Management Shell run this command:
Get-ECPVirtualDirectory | Format-List InternalURL,ExternalURL

20 Zář

MikroTik: disconnected, unicast key exchange timeout

I just fixed this problem by removing a space from the end of the PSK.

08 Zář

Windows, PowerShell a nastavení vlastníka adresáře podle názvu složky

Když vám třeba někdo rozbijete oprávnění na domovských složkách uživatelů z Active Directory…
Foreach ($Folder in Get-ChildItem "D:\data\home-students") {
$domain=”nazev.domeny”
$Username=$Folder.Name
$ID=new-object System.Security.Principal.NTAccount($domain, $username)
$Path="D:\data\home-students\$username"
write-host $path
$acl=get-acl $path
$acl.SetOwner($ID)
set-acl -path $path -aclObject $acl
}

25 Srp

PowerShell – Start All Exchange Services

Get-Service *Exchange* | Start-Service

06 Čvn

Change Hyper-V IP addres in Synology Active Backup for Business

1. Enable SSH

2. Sign as root user

3. Run SQLite3
sqlite3 /volume1/\@ActiveBackup/config.db

4. Determine inventory_id:
sqlite> SELECT inventory_id, host_name, host_addr FROM inventory_table;
1|172.26.1.3|172.26.1.3

5. Update IP address and host name (on row with correct inventory_id):
sqlite> update inventory_table set host_name = "172.26.1.3", host_addr = "172.26.1.3" WHERE inventory_id = '1';

6. Terminate SQLite3 program:
sqlite> .exit

7. Check Synology Active Backup for Business web interface if it’s ok…

09 Kvě

Create desktop shortcut to windows update (Windows 10/Windows Server 2019)

1. Right-click an empty area on the desktop and select New > Shortcut
2. In the Location field, enter the following URI and click Next

ms-settings:windowsupdate

3. In the next field type in a shortcut name (Windows Update) and click Finish

09 Kvě

GPG error: https://download.jitsi.org stable/ InRelease: The following signatures couldn’t be verified

Error:
# apt update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Get:3 https://download.jitsi.org stable/ InRelease [1,882 B]
Err:3 https://download.jitsi.org stable/ InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B4D2D216F1FD7806
Reading package lists... Done
Building dependency tree
Reading state information... Done
12 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://download.jitsi.org stable/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B4D2D216F1FD7806
W: Failed to fetch https://download.jitsi.org/stable/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B4D2D216F1FD7806
W: Some index files failed to download. They have been ignored, or old ones used instead.

Quick fix:
# curl https://download.jitsi.org/jitsi-key.gpg.key | sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg'
# apt-get update

24 Bře

The following signatures were invalid: EXPKEYSIG B188E2B695BD4743

Error:
root@mailgw:~# apt update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InRelease
Hit:4 https://packages.sury.org/php buster InRelease
Err:4 https://packages.sury.org/php buster InRelease
The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php buster InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key
W: Failed to fetch https://packages.sury.org/php/dists/buster/InRelease The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key
W: Some index files failed to download. They have been ignored, or old ones used instead.

Quick fix:
# apt-key del 95BD4743; wget -nv -O - "https://packages.sury.org/php/apt.gpg" | apt-key add -
# apt-get update

Hodžův blog is is proudly powered by Wordpress and the Magellan Theme