James McDonald

Robocopy exclude Directories

Just trying to copy everything except a couple of directories from a drive to my NAS This is the secret incantation of robocopy when running in a Power Shell Terminal on Windows 11 robocopy d:\ \\mynas\toggen\DATA\ *.* /XD 'D:\$RECYCLE.BIN' 'D:\.Trash-1000' /E /Z From...

Synology DS1522+ Link Aggregation with Unifi UDM

Synology Configuration Plug in as many network cables between your Synology and Unifi Switch as you want to be in the bond. Each Network Interface on the Synology will receive an IP address via DHCP from the UDM. Login to your Synology using one of the IP addresses it...

Read a Windows registry Hive from Linux CLI

Just had to find the operating system of a remote computer so I copied the C:\Windows\System32\config\software.sav (the software hive file is locked by the OS so used the .sav instead) file to Ubuntu 2024 Linux and used hivexget to read the "ProductName" sudo apt-get...

List local disks

GET-CimInstance -query "SELECT * from Win32_DiskDrive" DeviceID Caption Partitions Size Model -------- ------- ---------- ---- ----- \\.\PHYSICALDRIVE0 WDC WD60EZAZ-00ZGHB0 0 6001172513280 WDC WD60EZAZ-00ZGHB0 \\.\PHYSICALDRIVE2 Seagate One Touch w/PW SCSI Disk Device...

Create ISO using Powershell

Usage New-IsoFile -NewIsoFilePath C:\tmp\Hyper-V.iso-sources -ImageName Hyper-V -SourceFilePath 'C:\tmp\Hyper-V' New-IsoFile -NewIsoFilePath C:\tmp\W2K3SP2CD1.iso -ImageName W2K3SP2CD1 -SourceFilePath 'C:\tmp\Windows 2003 Server R2 Std Edition SP2 CD1' New-IsoFile...

Event 1008

TGN-HV02 1008 Warning Microsoft-Windows-Perflib Application 9/06/2024 5:30:28 PMThe Open procedure for service "BITS" in DLL "C:\Windows\System32\bitsperf.dll" failed with error code The system cannot find the file specified.. Performance data for this service will...

How to Delete a Hyper-V VM and ITS Hard Drives

If its a replica Remove Replication Get the paths to the Hard Drives Get-VM TGN-RWD-BK01 |Select-Object -ExpandProperty HardDrives Make a note of the location of the hard drives from the output VMName ControllerType ControllerNumber ControllerLocation DiskNumber Path...

Side by side php8.3-FPM

CakePHP 5 uses zend.assertions = 1 for development so if you have production and test environments on your server you need separate instance of php-fpm so you can run one with zend.assertions = 1 for development and the other zend.assertions = -1 for production The...