How would I go about getting the maxspace used by shadowstorage on C drive as a string in GB? Only thing I found so far is this cmdlet which lists all parameters:
get-wmiobject win32_shadowstorage
But I only need the valued of MaxSpace converted in GB and only for C drive. The purpose of this is for using in a wpf app later on as if/else statement. PowerShell seems to be the fastest way to achieve this and the "elderly" vssadmin seems only to accept parameters, not to retrieve anything...
Thanks in advance
Run
Get-WmiObject -Class "Win32_ShadowStorage". You can be interested in the following properties:AllocatedSpace(Data type:uint64) Allocated space on the differential area volume.DiffVolume(Data type:Win32_Volume) Reference to the differential volume.Volume(Data type:Win32_Volume) Reference to the original volume.Properties
DiffVolumeandVolumelook like (GUID can vary)and this appearance invites you to check the
Win32_Volumeclass, and Bingo! There is theDriveLetterproperty! Putting this together: