Go to cloudflare and login
click profile icon
select my profile
go to api tokens tab
create new custom token
Give token a name
give the following permissions
Zone Zone Edit
Zone DNS Edit
Zone Resources
Include all zones
IP Address filtering
none (unless you wanted to restrict access, I have not as my IP is dynamic)
TTL
Blank
Continue to summary
Create token
Copy API Token
Install Certify the web application
https://certifytheweb.com/home/
For authentication we will use DNS verification via Cloudflare API
On Certify the web go to Settings
stored credentials
add new stored credentials
Select Cloudflare DNS API
Set credentials name to easily identify
fill in the api token in the api token field
click save
on manage certificates page
new certificate
click okay on prompt about registering a new contact
select certificate authority of lets encrypt
enter email address,( notify you of upcoming renewals if required, invalid email addresses will be rejected by certificate authority
Agree to the terms
click register contact
On new certificate window
leave slecte site as no IIS side selected
add the required domain name and click +
Go to authorization tab
change challenge type to dns-01
DNS update method - cloudflare...
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
...
Reason server is not configured to use the old storage space setup
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
update alls virtual drives to automount
Get-VirtualDisk | Set-VirtualDisk -IsManualAttach $False...
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...
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="CertificateSHA1Hash"
You can get the Certificate SHA1 Hash by using openssl...
Within Azure I used the Azure Backup server I unregsitered the server I was using however backup items still displayed which prevent me removing the vault
solution was to go to manage > backup infrastructure
then under management servers click on Backup mananagement server and remove from there.
If it is a single server backup
under backup ingrastructure go to protected servers (azure backup agent)
select server and choose delete
Once removed you can then delete the recovery vault...
Run Powershell as admin
get-vm * | select Name,@{L="Disks";E={$_.harddrives.path}} | Export-Csv c:\temp\vmdisklocations.csv
Creates CSV which looks like the below
Name
Disks
WACLS1-VM
S:\VM\WACLS1-vm.vhdx H:\VMs HDD\WACLS1-VM\WACLS1-backupdisk.vhdx H:\VMs HDD\WACLS1-VM\WACLS!-VMM-Lib.vhdx
...
Recently I have had a issue that a service was stuck on starting
Get the PID of the service
sc queryex servicename
Use the PID to kill the task
taskkill /f /pid [PID]
It will then say
SUCCESS: The process with PID XXXX has been terminated....
Not sure why this occurred however I was planning to add a new drive to a vm, however could not add the new drive.
Thinking back to an issue with a VM at work, on my VM exchange I tried to edit an existing drive on the VM and it mentions checkpoints exist.
In poweshell I did get-vmsnapshot Exchange it mentioned it was a recovery checkpoint
The command I used to remove it was get-vmsnapshot exchange | remove-vmsnapshot
Below is a screenshot of the CMD/Powershell window
...