Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Volume Shadow Copy Service (VSS) from .NET - best method/project available?

I'd like to add VSS support to an application I'm developing and the only good packaged method available seems to be AlphaVSS, though it hasn't been actively developed in almost two years. Are there other projects out there that I just can't find, or is there a more straightforward method to accessing the "API" (if you can call it that)?

like image 989
SqlRyan Avatar asked Nov 14 '22 05:11

SqlRyan


1 Answers

Could you use WMI Win32_ShadowCopy class. I don't have a C# sample, but working with WMI is usually nicer in PowerShell in any case:


function global:CREATE-SHADOW ( $Drive ) { 
  (Get-WmiObject -list win32_shadowcopy).Create($Drive,"ClientAccessible") 
}

via: http://www.energizedtech.com/2010/04/powershell-creation-of-a-shado.html

like image 118
Aaron Avatar answered Apr 28 '23 23:04

Aaron