Im trying to gather all the Mount points from systems for backup purposes,
when I run mountvol I get output like below, I would just like to parse out “E:\inetpub”, anything that isn’t a drive letter only
im looking for any to do this, WMI would also be fine
Creates, deletes, or lists a volume mount point. MOUNTVOL [drive:]path VolumeName MOUNTVOL [drive:]path /D MOUNTVOL [drive:]path /L MOUNTVOL [drive:]path /P MOUNTVOL /R MOUNTVOL /N MOUNTVOL /E path Specifies the existing NTFS directory where the mount point will reside. VolumeName Specifies the volume name that is the target of the mount point. /D Removes the volume mount point from the specified directory. /L Lists the mounted volume name
for the specified directory. /P Removes the volume mount point from the specified directory, dismounts the volume, and makes the volume not mountable. You can make the volume mountable again by creating a volume mount point. /R Removes volume mount point directories and registry settings
for volumes that are no longer in the system. /N Disables automatic mounting of
new volumes. /E Re-enables automatic mounting of
new volumes. Possible values
for VolumeName along with current mount points are: \\?\Volume
{db8f8c9c-e247-11dd-a25f-806e6f6e6963
}\ C:\ \\?\Volume
{9af52c76-e27d-11dd-859c-505054503030
}\ E:\ \\?\Volume
{9af52c78-e27d-11dd-859c-505054503030
}\ F:\ \\?\Volume
{db8f8c9b-e247-11dd-a25f-806e6f6e6963
}\ D:\ \\?\Volume
{db8f8c9a-e247-11dd-a25f-806e6f6e6963
}\ A:\ \\?\Volume
{b6be8478-90be-4599-98f7-0a68ec99d9fb
}\ G:\ E:\inetpub\
Our backup guy asked if I could get a list of all the mount points, because the backup software is setup not to backup these mounted disks
Relevance:
concatenation "; " of unique values of (substrings between “%22” of (following texts of firsts “=” of ((string values of selects "directory from Win32_MountPoint " of wmi))) whose (length of it > 6))
concatenation “” of substrings separated by “\” of (concatenation "; " of unique values of (substrings between “%22” of (following texts of firsts “=” of ((string values of selects "directory from Win32_MountPoint " of wmi))) whose (length of it > 6)))
1 issue is this wmi call only works on 2003+ windows 2000 gives an error