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

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

Permissions error when installing dropbox

Hit Windows + R 2. Type regedit and hit enter 3. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb 4. In the folder, right click and hit New > DWORD (32 Bit) Value 5. Name it 'ProtectionPolicy' 6. Right click 'Protection Policy' 7. Hit Modify and change the value to 1 and select Base: Hexadecimal Reboot then install dropbox ...
Read More

Create windows admin account via bat file

open notepad Paste the following @echo off net user Username Password /add /comment:"Admin" /passwordchg:NO wmic useraccount where "name='Username'" set passwordexpires=FALSE net localgroup "Administrators" Username /add PAUSE   Replace Username with the username you want to use Replace Password with the password you want to use...
Read More