Skip to content

Instantly share code, notes, and snippets.

@stylersnico
Created January 23, 2019 08:51
Show Gist options
  • Save stylersnico/65ff7961b453ecd7ba17f3d4bdbcfde7 to your computer and use it in GitHub Desktop.
Save stylersnico/65ff7961b453ecd7ba17f3d4bdbcfde7 to your computer and use it in GitHub Desktop.
Script to run after a veeam backup for dismounting the disk so he is no longer available for malwares, ransomwares and intruders.
$vol = get-wmiobject -Class Win32_Volume | where{$_.Name -eq 'B:\'}
$vol.DriveLetter = $null
$vol.Put()
$vol.Dismount($false, $false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment