1
서버에서 마운트 된 드라이브 만 반환하는 간단한 WQL 쿼리를 만들려고합니다. 이들은 드라이브 문자가없는 드라이브입니다. WQL의 서버에서 마운트 된 드라이브 반환
나는 다음과 같은 sytnax을 시도하고 결과 집합을 반환하지 않는 : 내 WQL 문을 변경해야합니다string ManagementPath = string.Format(@"\\{0}\root\CIMV2", txtServerName.Text);
ConnectionOptions DriveConnOptions = new ConnectionOptions();
ObjectQuery oq = new ObjectQuery(@"SELECT * FROM Win32_Volume WHERE DriveLetter = """"");
ManagementScope Scope = new ManagementScope(ManagementPath, DriveConnOptions);
ManagementObjectSearcher Searcher = new ManagementObjectSearcher(Scope, oq);
ManagementObjectCollection collection = Searcher.Get();
foreach (ManagementObject mo in collection)
{
//do something...
}