This has been bugging me from quite some time and I feel like there must be a way but google has proven fruitless. I know I can do a rescan from diskpart, but I also need the ability to run the "Refresh" command from a script that gets run by right-clicking on Disk Management and clicking on Refresh. Language doesn't really matter, but I am ultimately rolling it into a c# program but I can call external commands if needed but WMI/.NET/Win32 is probably more elegant. Alternatively, a pre-written but free program that will extend a parition to fill a resized base disk (extend only) would work too, as that's the operation i'm trying to work through.
Any thoughts?
Edit: I'm working with Windows 2003 R2 and 2008 R2, so ideally it would work for both but 2008 R2 is the focus
Any thoughts?
Edit: I'm working with Windows 2003 R2 and 2008 R2, so ideally it would work for both but 2008 R2 is the focus