Clear DNS Windows MacOS Linux

Windows CMD as admin ipconfig /flushdns   MacOS Applications> Utilities > Terminal 10.7, 10.8, and 10.9 10.10.4 and above - sudo killall -HUP mDNSResponder 10.10.1, 10.10.2, and 10.10.3 - sudo discoveryutil mdnsflushcache 10.5 and 10.6 - sudo dscacheutil -flushcache Enter mac login password (requires admin)   Linux Check if service is running - sudo systemctl is-active systemd-resolved.service sudo systemd-resolve --flush-caches  ...
Read More

Bulk update VHD Location on Hyper-V Host

used for is you have already moved the files, for instance I updated from using the computer name \\storage\ to the FQDN   get Excel file get-VMHardDiskDrive -VMName * | select VMName,ControllerType,ControllerNumber,ControllerLocation,Path | Export-Csv -Delimiter ";" -Path "c:\temp\vmvhdloc.csv" In excel file update path to what you want it to be (note this does not move the file) import-csv c:\temp\vmvhdloc.csv | ForEach-Object { set-VMHardDiskDrive -VMName $_.VM -ControllerType $_.CT -ControllerNumber 0 -ControllerLocation $_.CL -Path $_.newpath } get-vm * | Get-VMHardDiskDrive  ...
Read More

Virtual disk does not mount after restarting server

Either when you reinstall OS or add a new drive it seems to of disabled auto mount Confirm you have read/write access on the server you on Server Manager->File and Storage Services->Volumes->Storage Pools Right-click storage pool and choose “Set Read-Write access" and OK on the prompt Set drive to automatically mount in powershell Get-VirtualDisk | select friendlyname,ismanualattach friendlyname ismanualattach ------------ -------------- 4TB True 2TB False Front Bay False Msata False Update all disk to be auto get-VirtualDisk | Set-VirtualDisk -IsManualAttach $False Confirm check applied Get-VirtualDisk | seect friendlyname,ismanualattach friendlyname ismanualattach ------------ -------------- 4TB False 2TB False Front Bay False Msata False...
Read More

Delete folder via CMD on Windows

run command prompt as admin cd to the location of folder DEL /F/Q/S *.* > NUL    (this deletes all files all the folder structure) used cd.. to navigate to parent folder RMDIR /Q/S foldername (this deletes the folder and all subfolders) DEL /F/Q/S *.* > NUL /F -- forces the deletion of read-only files. /Q -- enables quiet mode. You are not ask if it is ok to delete files (if you don't use this, you are asked for any file in the folder). /S -- runs the command on all files in any folder under the selected structure. *.* -- delete all files. > NUL -- disables console output. This improves the process further, shaving off about one quarter of the processing time off of the console command. RMDIR /Q/S foldername /Q -- Quiet mode, won't prompt for confirmation to delete folders. /S -- Run the operation on all folders of the selected path. foldername -- The absolute path or relative folder name, e.g. o:/backup/test1 or test1...
Read More

Unifi Controller install Ubuntu

1 cd /tmp/ 2 wget https://dl.ubnt.com/unifi/5.9.29/unifi_sysvinit_all.deb 3 sudo dpkg -i unifi_sysvinit_all.deb 4 sudo apt-get install -f 5 sudo dpkg -i unifi_sysvinit_all.deb 6 sudo service unifi status 7 sudo service unifi start 8 sudo service unifi status 9 sudo apt-get install -f 10 sudo dpkg -i unifi_sysvinit_all.deb 11 java -version 12 apt-get update 13 sudo apt-get update 14 sudo apt-get install default-jre 15 sudo add-apt-repository ppa:webupd8team/java 16 sudo apt-get update 17 sudo apt-get install oracle-java8-installer 18 java -verstion 19 sudo service unifi status 20 sudo service unifi start 21 sudo service unifi status 22 sudo nano /etc/init.d/unifi 23 sudo service unifi status 24 sudo service unifi restart 25 sudo service unifi status 26 sudo service unifi restart 27 sudo service unifi status 28 ifconfig 29 history...
Read More

Windows Server 2019 – shutdown event tracker shows at every login when RDP to server

While I was building a new server in which I was using storage pools I rebooted the system to check that the drives auto mounted, while doing this I found that I kept getting the shutdown event tracker when I logged in and it did not go away (this even occurred when using restart option) I look online for other things and found that someone else had this issue for 2016 and 2019, The solution open registry go to \HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability backup .\DirtyShutdown .\DirtyShutdownTime Then delete those values...
Read More

Failover Cluster manager – get list of Vm’s and if a VM has a DVD (iso file)

Powershell Get-ClusterGroup -Cluster 19-hv | ? {$_.GroupType –eq 'VirtualMachine' } | Get-VM | Get-VMDvdDrive   19-hv is the cluster name I have created VMName ControllerType ControllerNumber ControllerLocation DvdMediaType Path ------ -------------- ---------------- ------------------ ------------ ---- 19-RDSH SCSI 0 1 None 2016DC-1 SCSI 0 1 None 2019 SCSI 0 1 None Android IDE 1 0 ISO \\fs1\OS\Linux\android-x86-5.1-rc1.iso AzureADConnect2 SCSI 0 1 None CentOS-G1 IDE 1 0 None Domonitor SCSI 0 1 None exchange IDE 1 0 None FireflyIII IDE 1 0 None G2-testboot SCSI 0 1 None GMVault SCSI 0 1 None GW2 SCSI 0 1 None JenkinsTestServer IDE 1 0 None LanSweep SCSI 0 1 None leSSL1 IDE 1 0 None MCS2(Toms Server) IDE 1 0 None MCS3 SCSI 0 1 None MCS4 SCSI 0 1 None Mgmt1 SCSI 0 1 None MineOS-G1 IDE 1 0 None Observium SCSI 0 1 None ODSPSync SCSI 0 1 None PFsense SCSI 0 1 None PFSenseG1 IDE 1 0 None Proxmox-G1 IDE 1 0 None SharePoint 2019 SCSI 0 1 None Sharepoint1 SCSI 0 1 None SQL SCSI 0 1 None Steam-Cache SCSI 0 1 None SYSDeploy SCSI 0 2 None SYSDEPLOY1 IDE 1 0 None SYSWebM1 IDE 1 0...
Read More